Bugfix: dissolve all militia groups involved in a battle when it is completed. this fixes bad/immobile militia groups created by safehouses (ARC feature) (by rftr).

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9170 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Sevenfm
2021-10-04 06:59:37 +00:00
parent 20335041f7
commit 9ebd4a5137
4 changed files with 24 additions and 15 deletions
+1 -15
View File
@@ -2678,21 +2678,7 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Autoresolve2");
// Flugente: after we fought, move any militia in groups into the sector garrison - the player will likely want to rethink orders for the survivors
// Flugente: in case militia died we have to lower the group sizes
// loop over all militia groups that are in this sector and alter their size. If a group has size 0 delete it. If any militia are left place them into this sector
{
GROUP* pGroup = gpGroupList;
while ( pGroup )
{
if ( pGroup->usGroupTeam == MILITIA_TEAM && pGroup->ubSectorX == gpAR->ubSectorX && pGroup->ubSectorY == gpAR->ubSectorY )
{
GROUP* pDeleteGroup = pGroup;
pGroup = pGroup->next;
DissolveMilitiaGroup( pDeleteGroup->ubGroupID );
}
else
pGroup = pGroup->next;
}
}
DissolveAllMilitiaGroupsInSector(gpAR->ubSectorX, gpAR->ubSectorY);
//Record and process all enemy deaths
for( i = 0; i < MAX_AR_TEAM_SIZE; ++i )