From 3c0e0c0024b9c7f90538313a778494323363ba92 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Tue, 5 Apr 2016 17:28:07 +0100 Subject: [PATCH] Clear events on new game --- mods/ctf_events/init.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mods/ctf_events/init.lua b/mods/ctf_events/init.lua index 8bad81b..219b0ee 100644 --- a/mods/ctf_events/init.lua +++ b/mods/ctf_events/init.lua @@ -27,6 +27,11 @@ ctf.register_on_killedplayer(function(victim, killer, type) ctf_events.update_all() end) +ctf.register_on_new_game(function() + ctf_events.events = {} + ctf_events.update_all() +end) + function ctf_events.update_row(i, player, name, tplayer, evt) local idx = "ctf_events:" .. i .. "_one" local idxa = "ctf_events:" .. i .. "_action"