mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Update AirWing.lua
Avoid loop if mission is governed by an Airwing. Mission cancel will ask airwing to cancel will ask flightgroup to cancel, which doesn't work if the latter is dead. Rare but happens.
This commit is contained in:
parent
05b1ddf013
commit
e766eaeccc
@ -1464,7 +1464,9 @@ function AIRWING:onafterMissionCancel(From, Event, To, Mission)
|
|||||||
-- Info message.
|
-- Info message.
|
||||||
self:I(self.lid..string.format("Cancel mission %s", Mission.name))
|
self:I(self.lid..string.format("Cancel mission %s", Mission.name))
|
||||||
|
|
||||||
if Mission:IsPlanned() or Mission:IsQueued() or Mission:IsRequested() then
|
local Ngroups = Mission:CountOpsGroups()
|
||||||
|
|
||||||
|
if Mission:IsPlanned() or Mission:IsQueued() or Mission:IsRequested() or Ngroups == 0 then
|
||||||
|
|
||||||
Mission:Done()
|
Mission:Done()
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user