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:
Marco Antonio J. Costa
2026-08-21 18:07:05 -03:00
committed by majcosta
co-authored by Claude Opus 4.8
parent de4e0d3dc7
commit b0d4910a3c
2 changed files with 10 additions and 1 deletions
+4
View File
@@ -290,6 +290,10 @@ INT16 TerrainActionPoints( SOLDIERTYPE *pSoldier, INT32 sGridno, INT8 bDir, INT8
INT16 ActionPointCost( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bDir, UINT16 usMovementMode, UINT16 usPrevMovementMode );
// Convenience overload: prev mode = the soldier's current anim state (correct for real, per-step movement).
INT16 ActionPointCost( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bDir, UINT16 usMovementMode );
// bPathIndex/bPathLength give the fence-continuation context; usPrevMovementMode is the
// previous tile's mode (see ActionPointCost). Estimators summing a path pass their simulated
// prior mode; the shorter overload uses the soldier's live anim state.
INT16 EstimateActionPointCost( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bDir, UINT16 usMovementMode, INT8 bPathIndex, INT8 bPathLength, UINT16 usPrevMovementMode );
INT16 EstimateActionPointCost( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bDir, UINT16 usMovementMode, INT8 bPathIndex, INT8 bPathLength );
BOOLEAN SelectedMercCanAffordMove( );