mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
- 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:
+16
-12
@@ -4600,19 +4600,23 @@ void ExecuteStrategicAIAction( UINT16 usActionCode, INT16 sSectorX, INT16 sSecto
|
||||
pGroup = CreateNewEnemyGroupDepartingFromSector( SEC_P3, 0, 0, ubNumSoldiers );
|
||||
MoveSAIGroupToSector( &pGroup, ubSectorID, STAGE, REINFORCEMENTS );
|
||||
|
||||
if( gGarrisonGroup[ SectorInfo[ ubSectorID ].ubGarrisonID ].ubPendingGroupID )
|
||||
{ //Clear the pending group's assignment.
|
||||
pPendingGroup = GetGroup( gGarrisonGroup[ SectorInfo[ ubSectorID ].ubGarrisonID ].ubPendingGroupID );
|
||||
Assert( pPendingGroup );
|
||||
ClearPreviousAIGroupAssignment( pPendingGroup );
|
||||
}
|
||||
//Assign the elite squad to attack the SAM site
|
||||
pGroup->pEnemyGroup->ubIntention = REINFORCEMENTS;
|
||||
gGarrisonGroup[ SectorInfo[ ubSectorID ].ubGarrisonID ].ubPendingGroupID = pGroup->ubGroupID;
|
||||
// WANNE: This should fix the assertion in UC in the cutscene!
|
||||
if (SectorInfo[ ubSectorID ].ubGarrisonID != 255)
|
||||
{
|
||||
if( gGarrisonGroup[ SectorInfo[ ubSectorID ].ubGarrisonID ].ubPendingGroupID )
|
||||
{ //Clear the pending group's assignment.
|
||||
pPendingGroup = GetGroup( gGarrisonGroup[ SectorInfo[ ubSectorID ].ubGarrisonID ].ubPendingGroupID );
|
||||
Assert( pPendingGroup );
|
||||
ClearPreviousAIGroupAssignment( pPendingGroup );
|
||||
}
|
||||
//Assign the elite squad to attack the SAM site
|
||||
pGroup->pEnemyGroup->ubIntention = REINFORCEMENTS;
|
||||
gGarrisonGroup[ SectorInfo[ ubSectorID ].ubGarrisonID ].ubPendingGroupID = pGroup->ubGroupID;
|
||||
|
||||
if( pPendingGroup )
|
||||
{ //Reassign the pending group
|
||||
ReassignAIGroup( &pPendingGroup );
|
||||
if( pPendingGroup )
|
||||
{ //Reassign the pending group
|
||||
ReassignAIGroup( &pPendingGroup );
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user