fixes for running over water

- merc will continue running after he walks out of last water tile
- fixed both pathing prediction AP cost calculation and an actual AP cost deduction when running into water and out of water

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9068 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Shadooow
2021-06-09 03:25:43 +00:00
parent 4b8a00f6e2
commit 807bd518b3
3 changed files with 30 additions and 5 deletions
+15 -1
View File
@@ -542,6 +542,19 @@ INT16 ActionPointCost( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bDir, UINT16 u
sPoints = max(1.0f, ( sPoints * (100 - (FLOAT)gSkillTraitValues.ubATAPsMovementReduction) / 100.0f ) );
}
if (usMovementMode == RUNNING && pSoldier->usAnimState != RUNNING)
{
// CHRISL
if ((UsingNewInventorySystem() == true) && FindBackpackOnSoldier(pSoldier) != ITEM_NOT_FOUND)
{
sPoints += GetAPsStartRun(pSoldier) + 2; // changed by SANDRO
}
else
{
sPoints += GetAPsStartRun(pSoldier); // changed by SANDRO
}
}
// Flugente: riot shields lower movement speed
if ( pSoldier->IsRiotShieldEquipped( ) )
sPoints *= gItemSettings.fShieldMovementAPCostModifier;
@@ -2802,11 +2815,12 @@ INT8 MinAPsToStartMovement( SOLDIERTYPE * pSoldier, UINT16 usMovementMode )
default:
break;
}
/*
if (usMovementMode == RUNNING && pSoldier->usAnimState != RUNNING )
{
bAPs += GetAPsStartRun( pSoldier ); // changed by SANDRO
}
*/
return( bAPs );
}