diff options
author | mathiascode <8754153+mathiascode@users.noreply.github.com> | 2018-04-02 19:39:54 +0200 |
---|---|---|
committer | Alexander Harkness <me@bearbin.net> | 2018-04-02 19:39:54 +0200 |
commit | a879778968c5f9eaae97026b42046371d382b489 (patch) | |
tree | c7b628dd5908306ba3e7aaa15562e365e50c725c /src/ClientHandle.cpp | |
parent | Ignore KDevelop project files (#4192) (diff) | |
download | cuberite-a879778968c5f9eaae97026b42046371d382b489.tar cuberite-a879778968c5f9eaae97026b42046371d382b489.tar.gz cuberite-a879778968c5f9eaae97026b42046371d382b489.tar.bz2 cuberite-a879778968c5f9eaae97026b42046371d382b489.tar.lz cuberite-a879778968c5f9eaae97026b42046371d382b489.tar.xz cuberite-a879778968c5f9eaae97026b42046371d382b489.tar.zst cuberite-a879778968c5f9eaae97026b42046371d382b489.zip |
Diffstat (limited to 'src/ClientHandle.cpp')
-rw-r--r-- | src/ClientHandle.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp index 2d30224ad..3afd4cc83 100644 --- a/src/ClientHandle.cpp +++ b/src/ClientHandle.cpp @@ -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; } |