Massive effort to reign in militia problem. Still has issues :(

Fix:  If only some of mercs go to a lower level (mine, basement, etc) but do not choose to "GO TO SECTOR", sector is still inaccessible from strategic map.  However, watch for triggers that might happen on first visit to a sector, that fail.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1076 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Overhaul
2007-07-19 08:33:17 +00:00
parent e2fa801e2b
commit 9d71fc89f0
16 changed files with 2017 additions and 1904 deletions
+9 -1
View File
@@ -1132,8 +1132,9 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"QueenCommand");
}
}
//Well, not so rarely with mobile reinforcements!
//Rarely, there will be more enemies than supported by the engine. In this case, these
//soldier's are waiting for a slot to be free so that they can enter the battle. This
//soldiers are waiting for a slot to be free so that they can enter the battle. This
//essentially allows for an infinite number of troops, though only 32 at a time can fight.
//This is also called whenever an enemy group's reinforcements arrive because the code is
//identical, though it is highly likely that they will all be successfully added on the first call.
@@ -1304,6 +1305,13 @@ void AddPossiblePendingEnemiesToBattle()
AddEnemiesToBattle( pGroup, ubStrategicInsertionCode, ubNumAdmins, ubNumTroops, ubNumElites, FALSE );
gfPendingEnemies = TRUE;
}
// If there are still more to contribute, then move the remaining back to the sector they came from.
if (ubNumAvailable)
{
pGroup->ubSectorX = pGroup->ubPrevX;
pGroup->ubSectorY = pGroup->ubPrevY;
}
}
pGroup = pGroup->next;
}