Only disallow team changing and killing when calling kick/spec votes

This commit is contained in:
def 2015-07-09 19:07:33 +02:00
parent f6b4ca16f9
commit 1ef03e7387
2 changed files with 2 additions and 2 deletions

View file

@ -796,7 +796,7 @@ void CGameContext::ConJoinTeam(IConsole::IResult *pResult, void *pUserData)
if (!pPlayer)
return;
if (pSelf->m_VoteCloseTime && pSelf->m_VoteCreator == pResult->m_ClientID)
if (pSelf->m_VoteCloseTime && pSelf->m_VoteCreator == pResult->m_ClientID && (pSelf->m_VoteKick || pSelf->m_VoteSpec))
{
pSelf->Console()->Print(
IConsole::OUTPUT_LEVEL_STANDARD,

View file

@ -1586,7 +1586,7 @@ void CGameContext::OnMessage(int MsgID, CUnpacker *pUnpacker, int ClientID)
}
else if (MsgID == NETMSGTYPE_CL_KILL && !m_World.m_Paused)
{
if(m_VoteCloseTime && m_VoteCreator == ClientID && GetDDRaceTeam(ClientID))
if(m_VoteCloseTime && m_VoteCreator == ClientID && GetDDRaceTeam(ClientID) && (m_VoteKick || m_VoteSpec))
{
SendChatTarget(ClientID, "You are running a vote please try again after the vote is done!");
return;