mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
force vote only if there is a vote
This commit is contained in:
parent
1a1b4a096a
commit
4b2a34e1c5
|
@ -1385,6 +1385,11 @@ void CGameContext::ConClearVotes(IConsole::IResult *pResult, void *pUserData)
|
||||||
void CGameContext::ConVote(IConsole::IResult *pResult, void *pUserData)
|
void CGameContext::ConVote(IConsole::IResult *pResult, void *pUserData)
|
||||||
{
|
{
|
||||||
CGameContext *pSelf = (CGameContext *)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)
|
if(str_comp_nocase(pResult->GetString(0), "yes") == 0)
|
||||||
pSelf->m_VoteEnforce = CGameContext::VOTE_ENFORCE_YES;
|
pSelf->m_VoteEnforce = CGameContext::VOTE_ENFORCE_YES;
|
||||||
else if(str_comp_nocase(pResult->GetString(0), "no") == 0)
|
else if(str_comp_nocase(pResult->GetString(0), "no") == 0)
|
||||||
|
|
Loading…
Reference in a new issue