From df64a840ac7f82a34834b7ebdfb9e125b055a9f6 Mon Sep 17 00:00:00 2001 From: Thomas--S Date: Wed, 10 Feb 2016 20:34:18 +0100 Subject: [PATCH] Reset the vote when new match starts Bugfix for #46 code from /vote_clear Warning: This is untested --- mods/ctf_match/reset.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mods/ctf_match/reset.lua b/mods/ctf_match/reset.lua index 8290a47..82f029f 100644 --- a/mods/ctf_match/reset.lua +++ b/mods/ctf_match/reset.lua @@ -15,9 +15,19 @@ function ctf_match.next() minetest.after(1, function() ctf.reset() + if vote then + vote.active = {} + vote.queue = {} + vote.update_all_hud() + end end) end) else ctf.reset() + if vote then + vote.active = {} + vote.queue = {} + vote.update_all_hud() + end end end