From 169dcfe3f6dcb1e32b93cb215eeabfc0a96782a5 Mon Sep 17 00:00:00 2001 From: Jonathan Toppins Date: Thu, 28 Jun 2018 00:17:26 -0400 Subject: [PATCH] a2a-dispatcher: add check for not in air in OnEventEngineShutdown This fixes the problem of planes owned by gcicap would immediately despawn when shot causing their engine to quit. While not ultimately satisfying as planes shot while taxiing will still immediately despawn. One is now able to see their air victories in all their glory, including the fiery crash into the ground. Bug: 932 Signed-off-by: Jonathan Toppins --- Moose Development/Moose/AI/AI_A2A_Dispatcher.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Moose Development/Moose/AI/AI_A2A_Dispatcher.lua b/Moose Development/Moose/AI/AI_A2A_Dispatcher.lua index d8018b2fe..a85366d77 100644 --- a/Moose Development/Moose/AI/AI_A2A_Dispatcher.lua +++ b/Moose Development/Moose/AI/AI_A2A_Dispatcher.lua @@ -1049,7 +1049,8 @@ do -- AI_A2A_DISPATCHER if Squadron then self:F( { SquadronName = Squadron.Name } ) local LandingMethod = self:GetSquadronLanding( Squadron.Name ) - if LandingMethod == AI_A2A_DISPATCHER.Landing.AtEngineShutdown then + if LandingMethod == AI_A2A_DISPATCHER.Landing.AtEngineShutdown and + not DefenderUnit:InAir() then local DefenderSize = Defender:GetSize() if DefenderSize == 1 then self:RemoveDefenderFromSquadron( Squadron, Defender )