Permalink
Browse files

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

  • Loading branch information...
1 parent 2cc10fd commit 348806d993598a26025fc90dbfa022f495232420 @oy oy committed Jun 9, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/game/server/gamecontext.cpp
@@ -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;
}

0 comments on commit 348806d

Please sign in to comment.