mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
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:
+15
-1
@@ -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 );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user