- Bugfix: Fixed assertion crash in UC-1.13 cutscene, when Deidranna wants to send troops to the SAM

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4769 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2011-10-28 09:18:30 +00:00
parent c1fe373866
commit 67812044b8
+4
View File
@@ -4600,6 +4600,9 @@ void ExecuteStrategicAIAction( UINT16 usActionCode, INT16 sSectorX, INT16 sSecto
pGroup = CreateNewEnemyGroupDepartingFromSector( SEC_P3, 0, 0, ubNumSoldiers ); pGroup = CreateNewEnemyGroupDepartingFromSector( SEC_P3, 0, 0, ubNumSoldiers );
MoveSAIGroupToSector( &pGroup, ubSectorID, STAGE, REINFORCEMENTS ); MoveSAIGroupToSector( &pGroup, ubSectorID, STAGE, REINFORCEMENTS );
// WANNE: This should fix the assertion in UC in the cutscene!
if (SectorInfo[ ubSectorID ].ubGarrisonID != 255)
{
if( gGarrisonGroup[ SectorInfo[ ubSectorID ].ubGarrisonID ].ubPendingGroupID ) if( gGarrisonGroup[ SectorInfo[ ubSectorID ].ubGarrisonID ].ubPendingGroupID )
{ //Clear the pending group's assignment. { //Clear the pending group's assignment.
pPendingGroup = GetGroup( gGarrisonGroup[ SectorInfo[ ubSectorID ].ubGarrisonID ].ubPendingGroupID ); pPendingGroup = GetGroup( gGarrisonGroup[ SectorInfo[ ubSectorID ].ubGarrisonID ].ubPendingGroupID );
@@ -4614,6 +4617,7 @@ void ExecuteStrategicAIAction( UINT16 usActionCode, INT16 sSectorX, INT16 sSecto
{ //Reassign the pending group { //Reassign the pending group
ReassignAIGroup( &pPendingGroup ); ReassignAIGroup( &pPendingGroup );
} }
}
break; break;
case NPC_ACTION_ADD_MORE_ELITES: case NPC_ACTION_ADD_MORE_ELITES: