Skip to content

Commit 7ec5e77

Browse files
committed
Fix ExtendedAircraftMissions may remove aircraft with team from map
1 parent 4149958 commit 7ec5e77

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Ext/Aircraft/Hooks.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ DEFINE_HOOK(0x414D4D, AircraftClass_Update_ClearTargetIfNoAmmo, 0x6)
543543
// GreatestThreat: for all the mission that should let the aircraft auto select a target
544544
AbstractClass* __fastcall AircraftClass_GreatestThreat(AircraftClass* pThis, void* _, ThreatType threatType, CoordStruct* pSelectCoords, bool onlyTargetHouseEnemy)
545545
{
546-
if (RulesExt::Global()->ExtendedAircraftMissions)
546+
if (RulesExt::Global()->ExtendedAircraftMissions && !pThis->Team && pThis->Ammo && !pThis->Airstrike && !pThis->Spawned)
547547
{
548548
if (const auto pPrimaryWeapon = pThis->GetWeapon(0)->WeaponType)
549549
threatType |= pPrimaryWeapon->AllowedThreats();

0 commit comments

Comments
 (0)