if all mercs were killed or captured and default arrival sector is Omerta, force helidrop arrival animation

note: this has a small flaw that when there are more mercs arriving, they arrive with two helicopters and not just one - I am unable to fix this perhaps someone else can look into it, additionally it might be worth it to force quest quotes and even give letter, if the rebel hideout was not visited yet

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9050 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Shadooow
2021-05-25 19:09:24 +00:00
parent fc35e19915
commit 8c4c15adcf
+22
View File
@@ -488,6 +488,28 @@ void MercArrivesCallback( UINT8 ubSoldierID )
}
}
#endif
//shadooow: if all mercs were killed or captured and default arrival sector is Omerta, force helidrop arrival animation
if (guiCurrentScreen == MAP_SCREEN && pSoldier->flags.fUseLandingZoneForArrival && !gWorldSectorX && !gWorldSectorY && gbWorldSectorZ == -1 &&
gsMercArriveSectorX == gGameExternalOptions.ubDefaultArrivalSectorX && gsMercArriveSectorY == gGameExternalOptions.ubDefaultArrivalSectorY)
{
bool force_helidrop = true;
SOLDIERTYPE *pTeamSoldier;
for (UINT8 cnt = 0; cnt < giMAXIMUM_NUMBER_OF_PLAYER_SLOTS; cnt++)
{
if (gCharactersList[cnt].fValid)
{
pTeamSoldier = &Menptr[gCharactersList[cnt].usSolID];
if (pTeamSoldier != pSoldier && pTeamSoldier->bAssignment != ASSIGNMENT_DEAD && pTeamSoldier->bAssignment != ASSIGNMENT_POW && pTeamSoldier->bAssignment != IN_TRANSIT && pSoldier->ubStrategicInsertionCode != INSERTION_CODE_CHOPPER)
{
force_helidrop = false;
}
}
}
if (force_helidrop)
{
SetCurrentWorldSector(gGameExternalOptions.ubDefaultArrivalSectorX, gGameExternalOptions.ubDefaultArrivalSectorY, 0);
}
}
// add the guy to a squad
AddCharacterToAnySquad( pSoldier );