From f96be4eb0ed4430013c8ecfcb043c049d5103479 Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Thu, 25 Sep 2008 12:43:02 +0000 Subject: [PATCH] corrected voting limits --- src/game/server/gamecontext.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/game/server/gamecontext.cpp b/src/game/server/gamecontext.cpp index 0a79004d5..d5e5c19d5 100644 --- a/src/game/server/gamecontext.cpp +++ b/src/game/server/gamecontext.cpp @@ -316,13 +316,13 @@ void GAMECONTEXT::tick() } } - if(yes >= (total+1)/2) + if(yes >= total/2+1) { console_execute_line(vote_command); end_vote(); send_chat(-1, GAMECONTEXT::CHAT_ALL, "Vote passed"); } - else if(time_get() > vote_closetime || no >= (total+1)/2) + else if(time_get() > vote_closetime || no >= total/2+1) { end_vote(); send_chat(-1, GAMECONTEXT::CHAT_ALL, "Vote failed");