Fix healing interrupted on new match due to respawn (#400)
This commit is contained in:
parent
96636d4c88
commit
b8d1bdc9f3
2 changed files with 12 additions and 0 deletions
|
@ -62,6 +62,16 @@ local function stop_healing(player, interrupted)
|
||||||
player:hud_remove(info.hud)
|
player:hud_remove(info.hud)
|
||||||
end
|
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)
|
-- 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
|
-- heals player for a total of regen_max, limited by player's max hp
|
||||||
minetest.register_globalstep(function(dtime)
|
minetest.register_globalstep(function(dtime)
|
||||||
|
|
2
mods/pvp/medkits/mod.conf
Normal file
2
mods/pvp/medkits/mod.conf
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
name = medkits
|
||||||
|
depends = ctf_flag
|
Loading…
Reference in a new issue