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:
+11
-11
@@ -4586,8 +4586,8 @@ INT16 FindAdjacentGridEx( SOLDIERTYPE *pSoldier, INT16 sGridNo, UINT8 *pubDirect
|
||||
// fDoor determines whether special door-handling code should be used (for interacting with doors)
|
||||
|
||||
INT16 sFourGrids[4], sDistance=0;
|
||||
INT16 sDirs[4] = { NORTH, EAST, SOUTH, WEST };
|
||||
INT32 cnt;
|
||||
INT8 sDirs[4] = { NORTH, EAST, SOUTH, WEST };
|
||||
//INT32 cnt;
|
||||
INT16 sClosest=NOWHERE, sSpot, sOkTest;
|
||||
INT16 sCloseGridNo=NOWHERE;
|
||||
UINT32 uiMercFlags;
|
||||
@@ -4717,15 +4717,15 @@ INT16 FindAdjacentGridEx( SOLDIERTYPE *pSoldier, INT16 sGridNo, UINT8 *pubDirect
|
||||
|
||||
if ( sDistance < sClosest )
|
||||
{
|
||||
sClosest = sDistance;
|
||||
sCloseGridNo = (INT16)sGridNo;
|
||||
sClosest = sDistance;
|
||||
sCloseGridNo = sGridNo;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for (cnt = 0; cnt < 4; cnt++)
|
||||
for (INT8 cnt = 0; cnt < 4; cnt++)
|
||||
{
|
||||
// MOVE OUT TWO DIRECTIONS
|
||||
sFourGrids[cnt] = sSpot = NewGridNo( sGridNo, DirectionInc( sDirs[ cnt ] ) );
|
||||
@@ -4874,8 +4874,8 @@ INT16 FindNextToAdjacentGridEx( SOLDIERTYPE *pSoldier, INT16 sGridNo, UINT8 *pub
|
||||
// fDoor determines whether special door-handling code should be used (for interacting with doors)
|
||||
|
||||
INT16 sFourGrids[4], sDistance=0;
|
||||
INT16 sDirs[4] = { NORTH, EAST, SOUTH, WEST };
|
||||
INT32 cnt;
|
||||
INT8 sDirs[4] = { NORTH, EAST, SOUTH, WEST };
|
||||
//INT32 cnt;
|
||||
INT16 sClosest=WORLD_MAX, sSpot, sSpot2, sOkTest;
|
||||
INT16 sCloseGridNo=NOWHERE;
|
||||
UINT32 uiMercFlags;
|
||||
@@ -4952,7 +4952,7 @@ INT16 FindNextToAdjacentGridEx( SOLDIERTYPE *pSoldier, INT16 sGridNo, UINT8 *pub
|
||||
}
|
||||
|
||||
|
||||
for (cnt = 0; cnt < 4; cnt++)
|
||||
for (INT8 cnt = 0; cnt < 4; cnt++)
|
||||
{
|
||||
// MOVE OUT TWO DIRECTIONS
|
||||
sFourGrids[cnt] = sSpot = NewGridNo( sGridNo, DirectionInc( sDirs[ cnt ] ) );
|
||||
@@ -5131,13 +5131,13 @@ INT16 FindNextToAdjacentGridEx( SOLDIERTYPE *pSoldier, INT16 sGridNo, UINT8 *pub
|
||||
|
||||
INT16 FindAdjacentPunchTarget( SOLDIERTYPE * pSoldier, SOLDIERTYPE * pTargetSoldier, INT16 * psAdjustedTargetGridNo, UINT8 * pubDirection )
|
||||
{
|
||||
INT16 cnt;
|
||||
//INT16 cnt;
|
||||
INT16 sSpot;
|
||||
UINT8 ubGuyThere;
|
||||
|
||||
for ( cnt = 0; cnt < NUM_WORLD_DIRECTIONS; cnt++ )
|
||||
for ( INT8 cnt = 0; cnt < NUM_WORLD_DIRECTIONS; cnt++ )
|
||||
{
|
||||
sSpot = (INT16)NewGridNo( pSoldier->sGridNo, DirectionInc( cnt ) );
|
||||
sSpot = NewGridNo( pSoldier->sGridNo, DirectionInc( cnt ) );
|
||||
|
||||
if ( DoorTravelCost( pSoldier, sSpot, gubWorldMovementCosts[ sSpot ][ cnt ][ pSoldier->bLevel ], FALSE, NULL ) >= TRAVELCOST_BLOCKED )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user