mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 14:38:18 +00:00
fixed kill messages when a player leaves. closes #1744
This commit is contained in:
parent
0e655437c9
commit
b8fcdf9c8b
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue