mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-09 01:03:50 +01:00
Fix timing out of assist death message sources
This commit is contained in:
parent
3f3abbbee1
commit
1b0d6a2c2d
@ -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 New Issue
Block a user