summaryrefslogtreecommitdiffstats
path: root/src/ClientHandle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ClientHandle.cpp')
-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;
}