mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Fix: capturing soldiers who were members of reinforcement groups led to incorrect group size
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5889 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+3
-16
@@ -6855,6 +6855,9 @@ void RemoveCapturedEnemiesFromSectorInfo( INT16 sMapX, INT16 sMapY, INT8 bMapZ )
|
||||
else
|
||||
pTeamSoldier->RemoveSoldierFromGridNo( );
|
||||
|
||||
// this function updates number of enemies, and also updates groups
|
||||
ProcessQueenCmdImplicationsOfDeath( pTeamSoldier );
|
||||
|
||||
// Remove as target
|
||||
RemoveManAsTarget( pTeamSoldier );
|
||||
}
|
||||
@@ -6867,28 +6870,12 @@ void RemoveCapturedEnemiesFromSectorInfo( INT16 sMapX, INT16 sMapY, INT8 bMapZ )
|
||||
SECTORINFO *pSectorInfo = &( SectorInfo[ SECTOR( sMapX, sMapY ) ] );
|
||||
|
||||
pSectorInfo->uiNumberOfPrisonersOfWar += ubNumPrisoners;
|
||||
|
||||
pSectorInfo->ubNumAdmins -= ubNumPrisonerAdmin;
|
||||
pSectorInfo->ubNumTroops -= ubNumPrisonerTroop;
|
||||
pSectorInfo->ubNumElites -= ubNumPrisonerElite;
|
||||
|
||||
pSectorInfo->ubAdminsInBattle -= ubNumPrisonerAdmin;
|
||||
pSectorInfo->ubTroopsInBattle -= ubNumPrisonerTroop;
|
||||
pSectorInfo->ubElitesInBattle -= ubNumPrisonerElite;
|
||||
}
|
||||
else
|
||||
{
|
||||
UNDERGROUND_SECTORINFO *pSectorInfo = FindUnderGroundSector( sMapX, sMapY, bMapZ );
|
||||
|
||||
pSectorInfo->uiNumberOfPrisonersOfWar += ubNumPrisoners;
|
||||
|
||||
pSectorInfo->ubNumAdmins -= ubNumPrisonerAdmin;
|
||||
pSectorInfo->ubNumTroops -= ubNumPrisonerTroop;
|
||||
pSectorInfo->ubNumElites -= ubNumPrisonerElite;
|
||||
|
||||
pSectorInfo->ubAdminsInBattle -= ubNumPrisonerAdmin;
|
||||
pSectorInfo->ubTroopsInBattle -= ubNumPrisonerTroop;
|
||||
pSectorInfo->ubElitesInBattle -= ubNumPrisonerElite;
|
||||
}
|
||||
|
||||
if ( ubNumPrisoners )
|
||||
|
||||
Reference in New Issue
Block a user