1
0

Broadcast playerlist removal in every world (#4201)

This commit is contained in:
mathiascode
2018-04-02 20:39:54 +03:00
committed by Alexander Harkness
parent 7d8f126ada
commit a879778968
3 changed files with 26 additions and 6 deletions

View File

@@ -127,13 +127,11 @@ cClientHandle::~cClientHandle()
{
RemoveFromAllChunks();
m_Player->GetWorld()->RemoveClientFromChunkSender(this);
if (!m_Username.empty())
{
// Send the Offline PlayerList packet:
World->BroadcastPlayerListRemovePlayer(*m_Player, this);
}
m_Player->DestroyNoScheduling(true);
}
// Send the Offline PlayerList packet:
cRoot::Get()->BroadcastPlayerListsRemovePlayer(*m_Player);
m_PlayerPtr.reset();
m_Player = nullptr;
}