#Bloodfly from Dishonored 2
1 messages · Page 1 of 1 (latest)
This is not the right place for requests. This is for on-going projects and their progress.
I'll try to keep it updated
Problem with spawn of the Hive from corpse
function SpawnerManager.processCorpsesBatch()
local startTime = Utils.getCurrentTimestamp()
local currentTime = Utils.getGameHours()
local processed, spawned = 0, 0
for key, data in pairs(GameState.corpseDB) do
if processed >= CONFIG.batchProcessSize then break end
if (currentTime - data.lastCheck) < 0.5 then
goto continue
end
processed = processed + 1
data.lastCheck = currentTime
if data.processed then goto continue end
-- Verifica se cadavere è stato rimosso
if data.corpse and data.corpse:isRemoved() then
GameState.corpseDB[key] = nil
goto continue
end
-- Check tempo spawn (3 giorni)
if (currentTime - data.spawnTime) >= CONFIG.tempoSpawn then
if SpawnerManager.spawnHiveAtCorpse(data) then
spawned = spawned + 1
end
data.processed = true
end
::continue::
end