Fix timing out of assist death message sources

This commit is contained in:
Elias Fleckenstein 2021-05-26 20:48:00 +02:00
parent 3f3abbbee1
commit 1b0d6a2c2d

View file

@ -237,12 +237,10 @@ mcl_damage.register_on_damage(function(obj, damage, reason)
end)
minetest.register_globalstep(function(dtime)
local new_assist = {}
for obj, tbl in pairs(mcl_death_messages.assist) do
tbl.timeout = tbl.timeout - dtime
if (obj:is_player() or obj:get_luaentity()) and tbl.timeout > 0 then
new_assist[obj] = tbl
if not obj:is_player() and not obj:get_luaentity() or tbl.timeout > 0 then
mcl_death_messages.assist[obj] = nil
end
end
end)