Merge pull request #934 from jtoppins/issue-932

a2a-dispatcher: add check for not in air in OnEventEngineShutdown
This commit is contained in:
thebgpikester 2018-06-29 00:35:27 +01:00 committed by GitHub
commit 4bdb75245b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1045,7 +1045,8 @@ do -- AI_A2A_DISPATCHER
if Squadron then if Squadron then
self:F( { SquadronName = Squadron.Name } ) self:F( { SquadronName = Squadron.Name } )
local LandingMethod = self:GetSquadronLanding( 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() local DefenderSize = Defender:GetSize()
if DefenderSize == 1 then if DefenderSize == 1 then
self:RemoveDefenderFromSquadron( Squadron, Defender ) self:RemoveDefenderFromSquadron( Squadron, Defender )