summaryrefslogtreecommitdiffstats
path: root/src/ClientHandle.cpp
diff options
context:
space:
mode:
authormathiascode <8754153+mathiascode@users.noreply.github.com>2018-04-02 19:39:54 +0200
committerAlexander Harkness <me@bearbin.net>2018-04-02 19:39:54 +0200
commita879778968c5f9eaae97026b42046371d382b489 (patch)
treec7b628dd5908306ba3e7aaa15562e365e50c725c /src/ClientHandle.cpp
parentIgnore KDevelop project files (#4192) (diff)
downloadcuberite-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 '')
-rw-r--r--src/ClientHandle.cpp8
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;
}