Fix: background running speed bonus should only influence walking/running animations

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6416 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2013-09-18 16:57:46 +00:00
parent 5ebe26bc29
commit 8c643ef6fa
+17 -1
View File
@@ -8584,8 +8584,24 @@ void CalculateSoldierAniSpeed( SOLDIERTYPE *pSoldier, SOLDIERTYPE *pStatsSoldier
uiTerrainDelay += ( bLifeDef + bBreathDef + bAgilDef + bAdditional );
uiTerrainDelay = (uiTerrainDelay * (100 + pSoldier->GetBackgroundValue(BG_PERC_SPEED_RUNNING) )) / 100;
// Flugente: backgrounds
switch ( pSoldier->usAnimState )
{
case WALKING:
case WALKING_WEAPON_RDY:
case WALKING_DUAL_RDY:
case WALKING_ALTERNATIVE_RDY:
case RUNNING:
case SWATTING:
case SWATTING_WK:
case SWAT_BACKWARDS_WK:
uiTerrainDelay = (uiTerrainDelay * (100 + pSoldier->GetBackgroundValue(BG_PERC_SPEED_RUNNING) )) / 100;
break;
default:
break;
}
pSoldier->sAniDelay = (INT16)uiTerrainDelay;
// If a moving animation and w/re on drugs, increase speed....