mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-25 20:11:06 +01:00
Fix timing out of assist death message sources
This commit is contained in:
parent
3f3abbbee1
commit
1b0d6a2c2d
1 changed files with 2 additions and 4 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue