1
0
Fork 0

Fix timing out of assist death message sources

This commit is contained in:
Lizzy Fleckenstein 2021-05-26 20:48:00 +02:00
parent 3f3abbbee1
commit 1b0d6a2c2d
1 changed files with 2 additions and 4 deletions

View File

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