This commit is contained in:
FullGas1
2025-03-29 23:00:17 +01:00
parent 9023c571ba
commit e0e4279f20

View File

@@ -8238,10 +8238,10 @@ function ctld.eventHandler:onEvent(event)
if not mist.DBs.humansByName[unitName] then if not mist.DBs.humansByName[unitName] then
-- give a few milliseconds for MiST to handle the BIRTH event too -- give a few milliseconds for MiST to handle the BIRTH event too
ctld.logTrace("give MiST some time to handle the BIRTH event too") ctld.logTrace("give MiST some time to handle the BIRTH event too")
timer.scheduleFunction(function() timer.scheduleFunction(function(mistDBsHumansByName, t)
ctld.logTrace("calling the 'processHumanPlayer' function in a timer") ctld.logTrace("calling the 'processHumanPlayer' function in a timer")
processHumanPlayer(mist.DBs.humansByName) processHumanPlayer(mistDBsHumansByName)
end, nil, timer.getTime() + 0.5) end, {mist.DBs.humansByName}, timer.getTime() + 0.5)
else else
ctld.logTrace("calling the 'processHumanPlayer' function immediately") ctld.logTrace("calling the 'processHumanPlayer' function immediately")
processHumanPlayer(mist.DBs.humansByName) processHumanPlayer(mist.DBs.humansByName)