mirror of
https://github.com/ciribob/DCS-CTLD.git
synced 2025-08-15 06:17:22 +00:00
debug
This commit is contained in:
parent
e0e4279f20
commit
601805abb0
15
CTLD.lua
15
CTLD.lua
@ -8192,14 +8192,11 @@ function ctld.eventHandler:onEvent(event)
|
||||
return
|
||||
end
|
||||
|
||||
local function processHumanPlayer(mistDBsHumansByName)
|
||||
local function processHumanPlayer()
|
||||
ctld.logTrace("in the 'processHumanPlayer' function processHumanPlayer()- unitName = %s", ctld.p(unitName))
|
||||
ctld.logTrace("in the 'processHumanPlayer' function processHumanPlayer()- mist.DBs.humansByName[unitName] = %s", ctld.p(mist.DBs.humansByName[unitName]))
|
||||
ctld.logTrace("in the 'processHumanPlayer' function processHumanPlayer()- mist.DBs.humansByName = %s", ctld.p(mist.DBs.humansByName))
|
||||
ctld.logTrace("in the 'processHumanPlayer' function processHumanPlayer()- mistDBsHumansByName[unitName] = %s", ctld.p(mistDBsHumansByName[unitName]))
|
||||
ctld.logTrace("in the 'processHumanPlayer' function processHumanPlayer()- mistDBsHumansByName = %s", ctld.p(mistDBsHumansByName))
|
||||
--if mist.DBs.humansByName[unitName] then -- it's a human unit
|
||||
if mistDBsHumansByName[unitName] then -- it's a human unit
|
||||
if mist.DBs.humansByName[unitName] then -- it's a human unit
|
||||
ctld.logDebug("caught event %s for human unit [%s]", ctld.p(eventName), ctld.p(unitName))
|
||||
local _unit = Unit.getByName(unitName)
|
||||
if _unit ~= nil then
|
||||
@ -8238,13 +8235,13 @@ function ctld.eventHandler:onEvent(event)
|
||||
if not mist.DBs.humansByName[unitName] then
|
||||
-- give a few milliseconds for MiST to handle the BIRTH event too
|
||||
ctld.logTrace("give MiST some time to handle the BIRTH event too")
|
||||
timer.scheduleFunction(function(mistDBsHumansByName, t)
|
||||
timer.scheduleFunction(function()
|
||||
ctld.logTrace("calling the 'processHumanPlayer' function in a timer")
|
||||
processHumanPlayer(mistDBsHumansByName)
|
||||
end, {mist.DBs.humansByName}, timer.getTime() + 0.5)
|
||||
processHumanPlayer()
|
||||
end, nil, timer.getTime() + 1)
|
||||
else
|
||||
ctld.logTrace("calling the 'processHumanPlayer' function immediately")
|
||||
processHumanPlayer(mist.DBs.humansByName)
|
||||
processHumanPlayer()
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user