From f2c864ac043f16fd83db1ca1b17a9d4bb0b01608 Mon Sep 17 00:00:00 2001 From: ClobberXD Date: Mon, 31 Dec 2018 04:38:05 +0530 Subject: [PATCH] Clear kill list on new match --- mods/ctf_events/depends.txt | 1 + mods/ctf_events/init.lua | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/mods/ctf_events/depends.txt b/mods/ctf_events/depends.txt index bf1f229..4228c2a 100644 --- a/mods/ctf_events/depends.txt +++ b/mods/ctf_events/depends.txt @@ -1,3 +1,4 @@ ctf +ctf_match hudkit irc? diff --git a/mods/ctf_events/init.lua b/mods/ctf_events/init.lua index 6484122..e81bd8e 100644 --- a/mods/ctf_events/init.lua +++ b/mods/ctf_events/init.lua @@ -146,14 +146,12 @@ function ctf_events.update(player) end function ctf_events.update_all() - print("Updating ctf_event logs for all players") for _, player in pairs(minetest.get_connected_players()) do ctf_events.update(player) end end ctf.register_on_killedplayer(function(victim, killer, type) - print("Player killed, posting ctf_event") ctf_events.post("kill_" .. type, killer, victim) ctf_events.update_all() end) @@ -162,7 +160,7 @@ minetest.register_on_joinplayer(function(player) ctf_events.update(player) end) -ctf.register_on_new_game(function() +ctf_match.register_on_new_match(function() ctf_events.events = {} ctf_events.update_all() end)