Fix healing interrupted on new match due to respawn (#400)

This commit is contained in:
Lars Müller 2019-05-11 06:27:25 +02:00 committed by ANAND ︻气デ═一
parent 96636d4c88
commit b8d1bdc9f3
2 changed files with 12 additions and 0 deletions

View file

@ -62,6 +62,16 @@ local function stop_healing(player, interrupted)
player:hud_remove(info.hud)
end
ctf_flag.register_on_precapture(function()
for name, info in pairs(players) do
players[name]=nil
local player = minetest.get_player_by_name(name)
if player then
player:hud_remove(info.hud)
end
end
end)
-- Called after left-click every n seconds (determined by regen_interval)
-- heals player for a total of regen_max, limited by player's max hp
minetest.register_globalstep(function(dtime)

View file

@ -0,0 +1,2 @@
name = medkits
depends = ctf_flag