abort "move to spectator"-vote when the player disconnects

This commit is contained in:
oy 2011-06-09 22:31:55 +02:00
parent 2cc10fd6f0
commit 348806d993

View file

@ -343,7 +343,8 @@ void CGameContext::SendVoteStatus(int ClientID, int Total, int Yes, int No)
void CGameContext::AbortVoteKickOnDisconnect(int ClientID)
{
if(m_VoteCloseTime && !str_comp_num(m_aVoteCommand, "kick ", 5) && str_toint(&m_aVoteCommand[5]) == ClientID)
if(m_VoteCloseTime && ((!str_comp_num(m_aVoteCommand, "kick ", 5) && str_toint(&m_aVoteCommand[5]) == ClientID) ||
(!str_comp_num(m_aVoteCommand, "set_team ", 9) && str_toint(&m_aVoteCommand[9]) == ClientID)))
m_VoteCloseTime = -1;
}