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 );