1
0
mirror of https://github.com/veden/Rampant.git synced 2025-01-14 02:23:01 +02:00

FACTO-64: Adding lower limit for death decay to be set to nil

This commit is contained in:
Aaron Veden 2022-02-21 17:11:57 -08:00
parent 035ecb2bd7
commit 728b104f5e
No known key found for this signature in database
GPG Key ID: FF5990B1C6DD3F84

View File

@ -472,7 +472,12 @@ end
function chunkPropertyUtils.decayDeathGenerator(map, chunk)
local gen = map.chunkToDeathGenerator[chunk.id]
if gen then
map.chunkToDeathGenerator[chunk.id] = gen * MOVEMENT_GENERATOR_PERSISTANCE
local v = gen * MOVEMENT_GENERATOR_PERSISTANCE
if v <= 0.001 then
map.chunkToDeathGenerator[chunk.id] = nil
else
map.chunkToDeathGenerator[chunk.id] = v
end
end
end