#FLIGHTGROUP

* Resolve a stalemate when all jobs are done but _CheckGroupDone isn't called any longer
This commit is contained in:
Applevangelist 2023-11-06 18:36:02 +01:00
parent 6db2e333ad
commit eed6119193

View File

@ -216,7 +216,7 @@ FLIGHTGROUP.Players={}
--- FLIGHTGROUP class version.
-- @field #string version
FLIGHTGROUP.version="1.0.1"
FLIGHTGROUP.version="1.0.2"
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- TODO list
@ -1256,21 +1256,21 @@ function FLIGHTGROUP:Status()
-- Check damage.
self:_CheckDamage()
-- Get current mission (if any).
local mission=self:GetMissionCurrent()
-- TODO: Check if group is waiting?
if self:IsWaiting() then
if self.Twaiting and self.dTwait then
if timer.getAbsTime()>self.Twaiting+self.dTwait then
--self.Twaiting=nil
--self.dTwait=nil
--self:Cruise()
--self:_CheckGroupDone()
end
end
end
-- Get current mission (if any).
local mission=self:GetMissionCurrent()
-- If mission, check if DCS task needs to be updated.
if mission and mission.updateDCSTask then
@ -1363,7 +1363,7 @@ function FLIGHTGROUP:Status()
else
-- Check damage.
self:_CheckDamage()
self:_CheckDamage()
end
---
@ -1617,9 +1617,15 @@ function FLIGHTGROUP:Status()
---
self:_PrintTaskAndMissionStatus()
-- Current mission.
-- All done?
-- Get current mission (if any).
local mission=self:GetMissionCurrent()
if not mission then
self.Twaiting=nil
self.dTwait=nil
self:_CheckGroupDone()
end
end