fixed kill messages when a player leaves. closes #1744

This commit is contained in:
oy 2018-12-01 13:11:44 +01:00
parent 0e655437c9
commit b8fcdf9c8b

View file

@ -675,6 +675,11 @@ void CGameContext::OnClientTeamChange(int ClientID)
void CGameContext::OnClientDrop(int ClientID, const char *pReason)
{
AbortVoteOnDisconnect(ClientID);
m_pController->OnPlayerDisconnect(m_apPlayers[ClientID]);
delete m_apPlayers[ClientID];
m_apPlayers[ClientID] = 0;
// update clients on drop
if(Server()->ClientIngame(ClientID))
{
@ -693,11 +698,6 @@ void CGameContext::OnClientDrop(int ClientID, const char *pReason)
Server()->SendPackMsg(&Msg, MSGFLAG_VITAL|MSGFLAG_NORECORD, -1);
}
AbortVoteOnDisconnect(ClientID);
m_pController->OnPlayerDisconnect(m_apPlayers[ClientID]);
delete m_apPlayers[ClientID];
m_apPlayers[ClientID] = 0;
m_VoteUpdate = true;
}