From 077b8bd84d693a8d817eec1447c9e85675f03cc3 Mon Sep 17 00:00:00 2001 From: heinrich5991 Date: Mon, 22 Nov 2010 22:30:50 +0100 Subject: [PATCH] fixed sv_vote_percentage --- 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 b4f1c450f..0774f43b8 100644 --- a/src/game/server/gamecontext.cpp +++ b/src/game/server/gamecontext.cpp @@ -534,9 +534,9 @@ void CGameContext::OnTick() No++; } - if(Yes >= (Total/(100/g_Config.m_SvVotePercentage))) + if(Yes > Total / (100.0 / g_Config.m_SvVotePercentage)) m_VoteEnforce = VOTE_ENFORCE_YES; - else if(No >= (int)((Total+1)/((1.0/g_Config.m_SvVotePercentage)*100.0))) + else if(No >= Total - Total / (100.0 / g_Config.m_SvVotePercentage)) m_VoteEnforce = VOTE_ENFORCE_NO; }