Fixed issues with the cargo dispatch system not actually put cargo aircraft live into the mission.

This commit is contained in:
iTracerFacer
2025-11-20 08:58:34 -06:00
parent 38c45e8ef0
commit 6acad724c2
3 changed files with 71 additions and 17 deletions
+2 -2
View File
@@ -778,11 +778,11 @@ local function processCargoDelivery(cargoGroup, squadron, coalitionSide, coaliti
_G.processedDeliveries = {}
end
-- Use group ID + squadron airbase as dedupe key to avoid double crediting when the same group
-- Use group ID + squadron airbase + coalition as dedupe key to avoid double crediting when the same group
-- triggers multiple events or moves between airbases rapidly.
local okId, grpId = pcall(function() return cargoGroup and cargoGroup.GetID and cargoGroup:GetID() end)
local groupIdStr = (okId and grpId) and tostring(grpId) or "<no-id>"
local deliveryKey = groupIdStr .. "_" .. tostring(squadron.airbaseName)
local deliveryKey = coalitionKey:upper() .. "_" .. groupIdStr .. "_" .. tostring(squadron.airbaseName)
-- Diagnostic log: show group name, id, and delivery key when processor invoked
local okName, grpName = pcall(function() return cargoGroup and cargoGroup.GetName and cargoGroup:GetName() end)