mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
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:
@@ -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 )
|
||||
|
||||
Reference in New Issue
Block a user