mirror of
https://github.com/1dot13/source.git
synced 2026-09-16 14:47:17 +02:00
Fix: jeeps were not properly counted
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8361 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -162,7 +162,7 @@ UINT8 NumHostilesInSector( INT16 sSectorX, INT16 sSectorY, INT16 sSectorZ )
|
|||||||
pSector = FindUnderGroundSector( sSectorX, sSectorY, (UINT8)sSectorZ );
|
pSector = FindUnderGroundSector( sSectorX, sSectorY, (UINT8)sSectorZ );
|
||||||
if( pSector )
|
if( pSector )
|
||||||
{
|
{
|
||||||
ubNumHostiles = (UINT8)(pSector->ubNumAdmins + pSector->ubNumTroops + pSector->ubNumElites + pSector->ubNumCreatures + pSector->ubNumTanks);
|
ubNumHostiles = (UINT8)(pSector->ubNumAdmins + pSector->ubNumTroops + pSector->ubNumElites + pSector->ubNumCreatures + pSector->ubNumJeeps + pSector->ubNumTanks);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -172,7 +172,7 @@ UINT8 NumHostilesInSector( INT16 sSectorX, INT16 sSectorY, INT16 sSectorZ )
|
|||||||
|
|
||||||
//Count stationary hostiles
|
//Count stationary hostiles
|
||||||
pSector = &SectorInfo[ SECTOR( sSectorX, sSectorY ) ];
|
pSector = &SectorInfo[ SECTOR( sSectorX, sSectorY ) ];
|
||||||
ubNumHostiles = (UINT8)(pSector->ubNumAdmins + pSector->ubNumTroops + pSector->ubNumElites + pSector->ubNumCreatures + pSector->ubNumTanks);
|
ubNumHostiles = (UINT8)(pSector->ubNumAdmins + pSector->ubNumTroops + pSector->ubNumElites + pSector->ubNumCreatures + pSector->ubNumJeeps + pSector->ubNumTanks);
|
||||||
|
|
||||||
//Count mobile enemies
|
//Count mobile enemies
|
||||||
pGroup = gpGroupList;
|
pGroup = gpGroupList;
|
||||||
@@ -206,7 +206,7 @@ UINT8 NumEnemiesInAnySector( INT16 sSectorX, INT16 sSectorY, INT16 sSectorZ )
|
|||||||
pSector = FindUnderGroundSector( sSectorX, sSectorY, (UINT8)sSectorZ );
|
pSector = FindUnderGroundSector( sSectorX, sSectorY, (UINT8)sSectorZ );
|
||||||
if( pSector )
|
if( pSector )
|
||||||
{
|
{
|
||||||
ubNumEnemies = (UINT8)(pSector->ubNumAdmins + pSector->ubNumTroops + pSector->ubNumElites + pSector->ubNumTanks);
|
ubNumEnemies = (UINT8)(pSector->ubNumAdmins + pSector->ubNumTroops + pSector->ubNumElites + pSector->ubNumJeeps + pSector->ubNumTanks);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -216,7 +216,7 @@ UINT8 NumEnemiesInAnySector( INT16 sSectorX, INT16 sSectorY, INT16 sSectorZ )
|
|||||||
|
|
||||||
//Count stationary enemies
|
//Count stationary enemies
|
||||||
pSector = &SectorInfo[ SECTOR( sSectorX, sSectorY ) ];
|
pSector = &SectorInfo[ SECTOR( sSectorX, sSectorY ) ];
|
||||||
ubNumEnemies = (UINT8)(pSector->ubNumAdmins + pSector->ubNumTroops + pSector->ubNumElites + pSector->ubNumTanks);
|
ubNumEnemies = (UINT8)(pSector->ubNumAdmins + pSector->ubNumTroops + pSector->ubNumElites + pSector->ubNumJeeps + pSector->ubNumTanks);
|
||||||
|
|
||||||
//Count mobile enemies
|
//Count mobile enemies
|
||||||
pGroup = gpGroupList;
|
pGroup = gpGroupList;
|
||||||
@@ -373,7 +373,7 @@ UINT8 NumMobileEnemiesInSector( INT16 sSectorX, INT16 sSectorY )
|
|||||||
if( pSector->ubGarrisonID == ROADBLOCK )
|
if( pSector->ubGarrisonID == ROADBLOCK )
|
||||||
{
|
{
|
||||||
//consider these troops as mobile troops even though they are in a garrison
|
//consider these troops as mobile troops even though they are in a garrison
|
||||||
ubNumTroops += (UINT8)(pSector->ubNumAdmins + pSector->ubNumTroops + pSector->ubNumElites + pSector->ubNumTanks);
|
ubNumTroops += (UINT8)(pSector->ubNumAdmins + pSector->ubNumTroops + pSector->ubNumElites + pSector->ubNumJeeps + pSector->ubNumTanks);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ubNumTroops;
|
return ubNumTroops;
|
||||||
|
|||||||
Reference in New Issue
Block a user