From 4ec012ce7b01cb17aefec5d4aed549bddba95e69 Mon Sep 17 00:00:00 2001 From: "Marco Antonio J. Costa" Date: Sun, 7 Sep 2025 02:01:41 -0300 Subject: [PATCH] fix bug where combat doesn't end on team retreat fixes issue #498 where retreating from combat in a sector that has a merc inbound via the airdrop marker causes combat not to end the reason this fails is that a the inbound soldier counts as being in the sector being retreated from, even though he isn't I add a check for `MercPtrs[i]->bInSector` so this doesn't happen that way the function doesn't leave early and CheckForEndOfCombatMode is reached --- Strategic/strategicmap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Strategic/strategicmap.cpp b/Strategic/strategicmap.cpp index ad66f7e6..56c735eb 100644 --- a/Strategic/strategicmap.cpp +++ b/Strategic/strategicmap.cpp @@ -6604,7 +6604,7 @@ BOOLEAN CheckAndHandleUnloadingOfCurrentWorld( ) { //Check and see if we have any live mercs in the sector. for ( i = gTacticalStatus.Team[OUR_TEAM].bFirstID; i <= gTacticalStatus.Team[OUR_TEAM].bLastID; i++ ) { //If we have a live and valid soldier - if ( MercPtrs[i]->bActive && MercPtrs[i]->stats.bLife && !MercPtrs[i]->flags.fBetweenSectors && !(MercPtrs[i]->flags.uiStatusFlags & SOLDIER_VEHICLE) && !AM_A_ROBOT( MercPtrs[i] ) && !AM_AN_EPC( MercPtrs[i] ) ) + if ( MercPtrs[i]->bActive && MercPtrs[i]->stats.bLife && !MercPtrs[i]->flags.fBetweenSectors && MercPtrs[i]->bInSector && !(MercPtrs[i]->flags.uiStatusFlags & SOLDIER_VEHICLE) && !AM_A_ROBOT( MercPtrs[i] ) && !AM_AN_EPC( MercPtrs[i] ) ) { if ( MercPtrs[i]->sSectorX == gWorldSectorX && MercPtrs[i]->sSectorY == gWorldSectorY &&