You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function ctld.updateZoneCounter(_index, _diff)
if ctld.pickupZones[_index] ~= nil then
-- only update counter if amount for pickupzone is not infinite(-1)
if ctld.pickupZones[_index][3] >= 0 then
ctld.pickupZones[_index][3] = ctld.pickupZones[_index][3] + _diff
if ctld.pickupZones[_index][3] < 0 then
ctld.pickupZones[_index][3] = 0
end
if ctld.pickupZones[_index][6] ~= nil then
trigger.action.setUserFlag(ctld.pickupZones[_index][6], ctld.pickupZones[_index][3])
end
end
-- env.info(ctld.pickupZones[_index][1].." = " ..ctld.pickupZones[_index][3])
end
end
If in a pickup zone with infinite troops a group is dropped back the pickup zone counter is set to 0 (no troops available).
Problem, and solution, is that there is no check to see if the pickup has infinite troops before the sum(following line).
DCS-CTLD/CTLD.lua
Line 4545 in 9fe7020
The text was updated successfully, but these errors were encountered: