Skip to content

Commit

Permalink
Remove floats from src/droid.c.
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyp committed Nov 16, 2010
1 parent 3359fac commit 902ec04
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/droid.c
Expand Up @@ -1359,7 +1359,6 @@ void droidUpdateRecoil( DROID *psDroid )
{
UDWORD percent;
UDWORD recoil;
float fraction;
//added multiple weapon update
UBYTE i = 0;
UBYTE num_weapons = 0;
Expand Down Expand Up @@ -1417,10 +1416,7 @@ void droidUpdateRecoil( DROID *psDroid )
recoil = percent/5;
}

fraction =
(float)asWeaponStats[psDroid->asWeaps[i].nStat].recoilValue / 100.f;

recoil = (float)recoil * fraction;
recoil = recoil * asWeaponStats[psDroid->asWeaps[i].nStat].recoilValue / 100;

/* Put it into the weapon data */
psDroid->asWeaps[i].recoilValue = recoil;
Expand Down Expand Up @@ -2232,8 +2228,6 @@ UDWORD calcDroidBaseBody(DROID *psDroid)
UDWORD calcDroidBaseSpeed(DROID_TEMPLATE *psTemplate, UDWORD weight, UBYTE player)
{
UDWORD speed;
//engine output bonus? 150%
float eoBonus = 1.5f;

if (psTemplate->droidType == DROID_CYBORG ||
psTemplate->droidType == DROID_CYBORG_SUPER ||
Expand Down Expand Up @@ -2269,7 +2263,7 @@ UDWORD calcDroidBaseSpeed(DROID_TEMPLATE *psTemplate, UDWORD weight, UBYTE playe
// Wateremelon:applies the engine output bonus if output > weight
if ( (asBodyStats + psTemplate->asParts[COMP_BODY])->powerOutput > weight )
{
speed *= eoBonus;
speed = speed * 3 / 2;
}

return speed;
Expand Down

0 comments on commit 902ec04

Please sign in to comment.