mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
- removed variables that are not used
- some fixes on soldier direction calculations git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1403 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+4
-4
@@ -1484,7 +1484,7 @@ UINT8 MinAPsToPunch(SOLDIERTYPE *pSoldier, INT16 sGridNo, UINT8 ubAddTurningCost
|
||||
INT8 MinPtsToMove(SOLDIERTYPE *pSoldier)
|
||||
{
|
||||
// look around all 8 directions and return lowest terrain cost
|
||||
INT32 cnt;
|
||||
INT8 cnt;
|
||||
INT16 sLowest=127;
|
||||
INT16 sGridno,sCost;
|
||||
|
||||
@@ -1495,10 +1495,10 @@ INT8 MinPtsToMove(SOLDIERTYPE *pSoldier)
|
||||
|
||||
for (cnt=0; cnt <= 7; cnt++)
|
||||
{
|
||||
sGridno = NewGridNo(pSoldier->sGridNo,DirectionInc((INT16) cnt));
|
||||
sGridno = NewGridNo(pSoldier->sGridNo, DirectionInc( cnt ));
|
||||
if (sGridno != pSoldier->sGridNo)
|
||||
{
|
||||
if ( (sCost=ActionPointCost( pSoldier, sGridno, (UINT8)cnt , pSoldier->usUIMovementMode ) ) < sLowest )
|
||||
if ( (sCost=ActionPointCost( pSoldier, sGridno, cnt , pSoldier->usUIMovementMode ) ) < sLowest )
|
||||
{
|
||||
sLowest = sCost;
|
||||
}
|
||||
@@ -1513,7 +1513,7 @@ INT8 PtsToMoveDirection(SOLDIERTYPE *pSoldier, INT8 bDirection )
|
||||
INT8 bOverTerrainType;
|
||||
UINT16 usMoveModeToUse;
|
||||
|
||||
sGridno = NewGridNo( pSoldier->sGridNo, DirectionInc((INT16) bDirection ) );
|
||||
sGridno = NewGridNo( pSoldier->sGridNo, DirectionInc( bDirection ) );
|
||||
|
||||
usMoveModeToUse = pSoldier->usUIMovementMode;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user