From 0df01b9308898be7df338db8cc58264a2eccb66d Mon Sep 17 00:00:00 2001 From: savilli <78875209+savilli@users.noreply.github.com> Date: Fri, 16 Apr 2021 19:24:24 +0300 Subject: [PATCH] Fix double map skipping (#866) --- mods/ctf/ctf_match/vote.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/mods/ctf/ctf_match/vote.lua b/mods/ctf/ctf_match/vote.lua index eef2c6e..2bfc622 100644 --- a/mods/ctf/ctf_match/vote.lua +++ b/mods/ctf/ctf_match/vote.lua @@ -33,10 +33,12 @@ function ctf_match.vote_next(name) minetest.chat_send_all("Vote to skip match passed, " .. #results.yes .. " to " .. #results.no) - can_vote_skip = false - voted_skip = true - if flags_hold <= 0 then - skip() + if can_vote_skip then + can_vote_skip = false + voted_skip = true + if flags_hold <= 0 then + skip() + end end else minetest.chat_send_all("Vote to skip match failed, " ..