From 4f49560569600188d942cf8e02000a113c370cc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20M=C3=BCller?= <34514239+appgurueu@users.noreply.github.com> Date: Thu, 29 Apr 2021 15:54:29 +0200 Subject: [PATCH] Medkits: Don't give back if map is skipped (#870) --- mods/pvp/medkits/init.lua | 4 ++-- mods/pvp/medkits/mod.conf | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mods/pvp/medkits/init.lua b/mods/pvp/medkits/init.lua index 710ccb9..5848a0b 100644 --- a/mods/pvp/medkits/init.lua +++ b/mods/pvp/medkits/init.lua @@ -83,10 +83,10 @@ local function stop_healing(player, interrupted) player:hud_remove(info.hud) end -ctf_flag.register_on_precapture(function() +ctf_match.register_on_new_match(function() -- Reset all player states at the end of the match for name, info in pairs(players) do - players[name]=nil + players[name] = nil local player = minetest.get_player_by_name(name) if player then player:hud_remove(info.hud) diff --git a/mods/pvp/medkits/mod.conf b/mods/pvp/medkits/mod.conf index 67007d1..57151da 100644 --- a/mods/pvp/medkits/mod.conf +++ b/mods/pvp/medkits/mod.conf @@ -1,2 +1,2 @@ name = medkits -depends = ctf_flag +depends = ctf_match