mirror of
https://github.com/iTracerFacer/DCS_MissionDev.git
synced 2025-12-03 04:14:46 +00:00
Fixed CTLD Hover assistant / Crate pickup not working.
This commit is contained in:
parent
dddb2b3ce4
commit
0d9d348b6b
Binary file not shown.
Binary file not shown.
BIN
DCS_Kola/Operation_Polar_Shield/docs/kneeboards/1ZoneControl.xcf
Normal file
BIN
DCS_Kola/Operation_Polar_Shield/docs/kneeboards/1ZoneControl.xcf
Normal file
Binary file not shown.
@ -2715,13 +2715,38 @@ function CTLD:_ensureAdaptiveBackgroundLoop()
|
|||||||
CTLD._coachState[uname] = nil
|
CTLD._coachState[uname] = nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- If hover coach now empty, stop its scheduler
|
end
|
||||||
if next(CTLD._coachState) == nil then
|
|
||||||
if self.HoverSched and self.HoverSched.Stop then
|
-- Ensure the hover scan scheduler matches active transport presence
|
||||||
pcall(function() self.HoverSched:Stop() end)
|
local hasTransports = false
|
||||||
end
|
for gname, _ in pairs(self.MenusByGroup or {}) do
|
||||||
self.HoverSched = nil
|
local grp = nil
|
||||||
|
if GROUP and GROUP.FindByName then
|
||||||
|
local ok, res = pcall(function() return GROUP:FindByName(gname) end)
|
||||||
|
if ok then grp = res end
|
||||||
end
|
end
|
||||||
|
if grp and grp:IsAlive() then
|
||||||
|
hasTransports = true
|
||||||
|
break
|
||||||
|
end
|
||||||
|
if not grp and Group and Group.getByName then
|
||||||
|
local ok, dcsGrp = pcall(function() return Group.getByName(gname) end)
|
||||||
|
if ok and dcsGrp and dcsGrp:isExist() then
|
||||||
|
hasTransports = true
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if hasTransports then
|
||||||
|
if (not self.HoverSched) and self._startHoverScheduler then
|
||||||
|
pcall(function() self:_startHoverScheduler() end)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if self.HoverSched and self.HoverSched.Stop then
|
||||||
|
pcall(function() self.HoverSched:Stop() end)
|
||||||
|
end
|
||||||
|
self.HoverSched = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Determine next wake interval based on active salvage crates
|
-- Determine next wake interval based on active salvage crates
|
||||||
|
|||||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user