From 8c4c15adcfac2c2a52daf738a5aa0b7375c1dbea Mon Sep 17 00:00:00 2001 From: Shadooow Date: Tue, 25 May 2021 19:09:24 +0000 Subject: [PATCH] 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 --- Tactical/Merc Hiring.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Tactical/Merc Hiring.cpp b/Tactical/Merc Hiring.cpp index 372b88e3..5ccaec8b 100644 --- a/Tactical/Merc Hiring.cpp +++ b/Tactical/Merc Hiring.cpp @@ -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 );