mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
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:
@@ -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....
|
||||
|
||||
Reference in New Issue
Block a user