mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10: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:
@@ -194,9 +194,9 @@ INT8 CalcBestCTGT( SOLDIERTYPE *pSoldier, UINT8 ubOppID, INT16 sOppGridNo, INT8
|
||||
|
||||
// using only ints for maximum execution speed here
|
||||
// CJC: Well, so much for THAT idea!
|
||||
INT16 sCentralGridNo, sAdjSpot, sNorthGridNo, sSouthGridNo, sDir, sCheckSpot, sOKTest;
|
||||
|
||||
INT16 sCentralGridNo, sAdjSpot, sNorthGridNo, sSouthGridNo, sCheckSpot, sOKTest;
|
||||
INT8 bThisCTGT, bBestCTGT = 0;
|
||||
UINT8 sDir = 0;
|
||||
|
||||
sCheckSpot = -1;
|
||||
|
||||
@@ -209,7 +209,8 @@ INT8 CalcBestCTGT( SOLDIERTYPE *pSoldier, UINT8 ubOppID, INT16 sOppGridNo, INT8
|
||||
sSouthGridNo = NewGridNo( sCentralGridNo, DirectionInc(SOUTH) );
|
||||
|
||||
// look into all 8 adjacent tiles & determine where the cover is the worst
|
||||
for (sDir = 1; sDir <= 8; sDir++)
|
||||
// Lalien: shouldn't this start at 0 than?
|
||||
for (sDir = 0; sDir < NUM_WORLD_DIRECTIONS; sDir++)
|
||||
{
|
||||
// get the gridno of the adjacent spot lying in that direction
|
||||
sAdjSpot = NewGridNo( sCentralGridNo, DirectionInc( sDir ) );
|
||||
|
||||
@@ -574,7 +574,7 @@ INT16 InternalGoAsFarAsPossibleTowards(SOLDIERTYPE *pSoldier, INT16 sDesGrid, IN
|
||||
ubDirChecked[ubDirection] = TRUE;
|
||||
|
||||
// determine the gridno 1 tile away from current friend in this direction
|
||||
sTempDest = NewGridNo(sDesGrid,DirectionInc( (INT16)(ubDirection + 1) ));
|
||||
sTempDest = NewGridNo(sDesGrid, DirectionInc( ubDirection + 1 ) );
|
||||
|
||||
// if that's out of bounds, ignore it & check next direction
|
||||
if (sTempDest == sDesGrid)
|
||||
@@ -625,8 +625,8 @@ INT16 InternalGoAsFarAsPossibleTowards(SOLDIERTYPE *pSoldier, INT16 sDesGrid, IN
|
||||
{
|
||||
// what is the next gridno in the path?
|
||||
|
||||
//sTempDest = NewGridNo( sGoToGrid,DirectionInc( (INT16) (pSoldier->usPathingData[sLoop] + 1) ) );
|
||||
sTempDest = NewGridNo( sGoToGrid,DirectionInc( (INT16) (pSoldier->usPathingData[sLoop]) ) );
|
||||
//sTempDest = NewGridNo( sGoToGrid,DirectionInc( (pSoldier->usPathingData[sLoop] + 1) ) );
|
||||
sTempDest = NewGridNo( sGoToGrid, DirectionInc( pSoldier->usPathingData[sLoop] ) );
|
||||
//NumMessage("sTempDest = ",sTempDest);
|
||||
|
||||
// this should NEVER be out of bounds
|
||||
|
||||
Reference in New Issue
Block a user