void CGameContext::OnClientDrop(int ClientID) { AbortVoteKickOnDisconnect(ClientID); m_apPlayers[ClientID]->OnDisconnect(); delete m_apPlayers[ClientID]; m_apPlayers[ClientID] = 0; (void)m_pController->CheckTeamBalance(); m_VoteUpdate = true; }
void CGameContext::OnClientDrop(int ClientID, const char *pReason) { AbortVoteKickOnDisconnect(ClientID); m_apPlayers[ClientID]->OnDisconnect(pReason); delete m_apPlayers[ClientID]; m_apPlayers[ClientID] = 0; (void)m_pController->CheckTeamBalance(); m_VoteUpdate = true; // update spectator modes for(int i = 0; i < MAX_CLIENTS; ++i) { if(m_apPlayers[i] && m_apPlayers[i]->m_SpectatorID == ClientID) m_apPlayers[i]->m_SpectatorID = SPEC_FREEVIEW; } }