mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
- Bug fix: This bug occured in Grumm H2. After playing two rounds of combat, the game freezes right when the END TURN button clicked. The enemy tries to reinforce H2 from several sectors simultaneously (H1 and G2), trying to put too many soldiers into H2 at the same time. As to other sectors, other people have reported the same occurance in Tixa and in Cambria G9, with the exact same symptoms.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@328 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -272,6 +272,29 @@ void GetNumberOfMobileEnemiesInSector( INT16 sSectorX, INT16 sSectorY, UINT8 *pu
|
||||
|
||||
}
|
||||
|
||||
void GetNumberOfMobileEnemiesInSectorWithoutRoadBlock( INT16 sSectorX, INT16 sSectorY, UINT8 *pubNumAdmins, UINT8 *pubNumTroops, UINT8 *pubNumElites )
|
||||
{
|
||||
GROUP *pGroup;
|
||||
SECTORINFO *pSector;
|
||||
Assert( sSectorX >= 1 && sSectorX <= 16 );
|
||||
Assert( sSectorY >= 1 && sSectorY <= 16 );
|
||||
|
||||
//Now count the number of mobile groups in the sector.
|
||||
*pubNumTroops = *pubNumElites = *pubNumAdmins = 0;
|
||||
pGroup = gpGroupList;
|
||||
while( pGroup )
|
||||
{
|
||||
if( !pGroup->fPlayer && !pGroup->fVehicle && pGroup->ubSectorX == sSectorX && pGroup->ubSectorY == sSectorY )
|
||||
{
|
||||
*pubNumTroops += pGroup->pEnemyGroup->ubNumTroops;
|
||||
*pubNumElites += pGroup->pEnemyGroup->ubNumElites;
|
||||
*pubNumAdmins += pGroup->pEnemyGroup->ubNumAdmins;
|
||||
}
|
||||
pGroup = pGroup->next;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void GetNumberOfStationaryEnemiesInSector( INT16 sSectorX, INT16 sSectorY, UINT8 *pubNumAdmins, UINT8 *pubNumTroops, UINT8 *pubNumElites )
|
||||
{
|
||||
SECTORINFO *pSector;
|
||||
|
||||
Reference in New Issue
Block a user