Disallow spectators to participate in kick votes

Fixes #186
This commit is contained in:
def 2015-04-19 14:15:50 +02:00
parent d690877117
commit 14b5766b30

View file

@ -629,9 +629,9 @@ void CGameContext::OnTick()
aVoteChecked[i]) // don't count in votes by spectators if the admin doesn't want it aVoteChecked[i]) // don't count in votes by spectators if the admin doesn't want it
continue; continue;
if(m_VoteKick && if(m_VoteKick && ((!m_apPlayers[i] || m_apPlayers[i]->GetTeam() == TEAM_SPECTATORS) ||
GetPlayerChar(m_VoteCreator) && GetPlayerChar(i) && (GetPlayerChar(m_VoteCreator) && GetPlayerChar(i) &&
GetPlayerChar(m_VoteCreator)->Team() != GetPlayerChar(i)->Team()) GetPlayerChar(m_VoteCreator)->Team() != GetPlayerChar(i)->Team())))
continue; continue;
if (m_apPlayers[i]->m_Afk) if (m_apPlayers[i]->m_Afk)