From 4b2a34e1c5885c332f6e8299f9822aef8ae8f766 Mon Sep 17 00:00:00 2001 From: SushiTee Date: Thu, 26 Jan 2012 22:17:26 +0100 Subject: force vote only if there is a vote --- src/game/server/gamecontext.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/game/server') diff --git a/src/game/server/gamecontext.cpp b/src/game/server/gamecontext.cpp index 87b9b3b7..96f981a6 100644 --- a/src/game/server/gamecontext.cpp +++ b/src/game/server/gamecontext.cpp @@ -1385,6 +1385,11 @@ void CGameContext::ConClearVotes(IConsole::IResult *pResult, void *pUserData) void CGameContext::ConVote(IConsole::IResult *pResult, void *pUserData) { CGameContext *pSelf = (CGameContext *)pUserData; + + // check if there is a vote running + if(!pSelf->m_VoteCloseTime) + return; + if(str_comp_nocase(pResult->GetString(0), "yes") == 0) pSelf->m_VoteEnforce = CGameContext::VOTE_ENFORCE_YES; else if(str_comp_nocase(pResult->GetString(0), "no") == 0) -- cgit 1.4.1 From e359f82c697abdb10d199be96402aec1107ec801 Mon Sep 17 00:00:00 2001 From: SushiTee Date: Thu, 26 Jan 2012 22:18:21 +0100 Subject: init m_LockTeams with 0 to prevent locked teams on server start --- src/game/server/gamecontext.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/game/server') diff --git a/src/game/server/gamecontext.cpp b/src/game/server/gamecontext.cpp index 96f981a6..5d2f22b8 100644 --- a/src/game/server/gamecontext.cpp +++ b/src/game/server/gamecontext.cpp @@ -33,6 +33,7 @@ void CGameContext::Construct(int Resetting) m_pVoteOptionFirst = 0; m_pVoteOptionLast = 0; m_NumVoteOptions = 0; + m_LockTeams = 0; if(Resetting==NO_RESET) m_pVoteOptionHeap = new CHeap(); -- cgit 1.4.1