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,14 +2715,39 @@ function CTLD:_ensureAdaptiveBackgroundLoop()
|
||||
CTLD._coachState[uname] = nil
|
||||
end
|
||||
end
|
||||
-- If hover coach now empty, stop its scheduler
|
||||
if next(CTLD._coachState) == nil then
|
||||
end
|
||||
|
||||
-- Ensure the hover scan scheduler matches active transport presence
|
||||
local hasTransports = false
|
||||
for gname, _ in pairs(self.MenusByGroup or {}) do
|
||||
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
|
||||
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
|
||||
local baseInterval = (cfg and cfg.DetectionInterval) or 5
|
||||
|
||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user