Escort menus are deleted once the escort crashes.

This commit is contained in:
FlightControl 2019-08-02 21:10:56 +03:00
parent 115743263b
commit 5a97f68778

View File

@ -364,6 +364,17 @@ function AI_ESCORT:onafterStart( EscortGroupSet )
self:_InitEscortRoute( EscortGroup )
self:SetFlightModeFormation( EscortGroup )
--- @param #AI_ESCORT self
-- @param Core.Event#EVENTDATA EventData
function EscortGroup:OnEventDeadOrCrash( EventData )
self:F( { "EventDead", EventData } )
self.EscortMenu:Remove()
end
EscortGroup:HandleEvent( EVENTS.Dead, EscortGroup.OnEventDeadOrCrash )
EscortGroup:HandleEvent( EVENTS.Crash, EscortGroup.OnEventDeadOrCrash )
end
)