mirror of
https://github.com/1dot13/source.git
synced 2026-08-26 14:30:26 +02:00
Add prev-mode overload of EstimateActionPointCost
Forwards to the new ActionPointCost prev-mode overload so a path estimator can pass its simulated prior tile mode. Existing 6-arg callers use the soldier's live anim state and are unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
committed by
majcosta
co-authored by
Claude Opus 4.8
parent
de4e0d3dc7
commit
b0d4910a3c
+6
-1
@@ -653,6 +653,11 @@ INT16 ActionPointCost( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bDir, UINT16 u
|
||||
}
|
||||
|
||||
INT16 EstimateActionPointCost( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bDir, UINT16 usMovementMode, INT8 bPathIndex, INT8 bPathLength )
|
||||
{
|
||||
return EstimateActionPointCost( pSoldier, sGridNo, bDir, usMovementMode, bPathIndex, bPathLength, pSoldier->usAnimState );
|
||||
}
|
||||
|
||||
INT16 EstimateActionPointCost( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bDir, UINT16 usMovementMode, INT8 bPathIndex, INT8 bPathLength, UINT16 usPrevMovementMode )
|
||||
{
|
||||
// This action point cost code includes the penalty for having to change
|
||||
// stance after jumping a fence IF our path continues...
|
||||
@@ -723,7 +728,7 @@ INT16 EstimateActionPointCost( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bDir,
|
||||
}
|
||||
}
|
||||
|
||||
sPoints += ActionPointCost( pSoldier, sGridNo, bDir, usMovementMode );
|
||||
sPoints += ActionPointCost( pSoldier, sGridNo, bDir, usMovementMode, usPrevMovementMode );
|
||||
|
||||
return (sPoints);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user