Experience speed adjustment happens after max speed limit; fix bug with speed calculation.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7760 4a71c877-e1ca-e34f-864e-861f7616d084
master
Guangcong Luo 2009-06-17 07:06:06 +00:00 committed by Git SVN Gateway
parent 80ea1a5649
commit 53c81cfdc9
2 changed files with 5 additions and 4 deletions

View File

@ -2455,9 +2455,6 @@ UDWORD calcDroidSpeed(UDWORD baseSpeed, UDWORD terrainType, UDWORD propIndex, UD
// Factor in terrain
speed *= getSpeedFactor(terrainType, propulsion->propulsionType);
speed /= 100;
// Factor in experience
speed *= (100 + EXP_SPEED_BONUS * level);
speed /= 100;
// Need to ensure doesn't go over the max speed possible for this propulsion
if (speed > propulsion->maxSpeed)
@ -2465,6 +2462,10 @@ UDWORD calcDroidSpeed(UDWORD baseSpeed, UDWORD terrainType, UDWORD propIndex, UD
speed = propulsion->maxSpeed;
}
// Factor in experience
speed *= (100 + EXP_SPEED_BONUS * level);
speed /= 100;
return speed;
}

View File

@ -1857,7 +1857,7 @@ SDWORD moveCalcDroidSpeed(DROID *psDroid)
}
// now offset the speed for the slope of the droid
speed = (MAX_SPEED_PITCH - pitch) * speed / MAX_SPEED_PITCH;
if (speed <= 0)
if (speed <= 10)
{
// Very nasty hack to deal with buggy maps, where some cliffs are
// not properly marked as being cliffs, but too steep to drive over.