diff options
author | LogicParrot <LogicParrot@users.noreply.github.com> | 2016-04-24 18:43:41 +0200 |
---|---|---|
committer | LogicParrot <LogicParrot@users.noreply.github.com> | 2016-04-24 18:43:41 +0200 |
commit | defa64619edf77e769ad499753c5fd268606f3d9 (patch) | |
tree | 50dc12fed52570a98fa06919629866ece6709e69 /src | |
parent | Merge pull request #3163 from cuberite/revert-3153-chunkLayer (diff) | |
parent | Fixed some logout crashes (diff) | |
download | cuberite-defa64619edf77e769ad499753c5fd268606f3d9.tar cuberite-defa64619edf77e769ad499753c5fd268606f3d9.tar.gz cuberite-defa64619edf77e769ad499753c5fd268606f3d9.tar.bz2 cuberite-defa64619edf77e769ad499753c5fd268606f3d9.tar.lz cuberite-defa64619edf77e769ad499753c5fd268606f3d9.tar.xz cuberite-defa64619edf77e769ad499753c5fd268606f3d9.tar.zst cuberite-defa64619edf77e769ad499753c5fd268606f3d9.zip |
Diffstat (limited to '')
-rw-r--r-- | src/ClientHandle.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp index 10fc66b21..8a45b0d6d 100644 --- a/src/ClientHandle.cpp +++ b/src/ClientHandle.cpp @@ -124,7 +124,6 @@ cClientHandle::~cClientHandle() { RemoveFromAllChunks(); m_Player->GetWorld()->RemoveClientFromChunkSender(this); - m_Player->SetIsTicking(false); if (!m_Username.empty()) { // Send the Offline PlayerList packet: @@ -174,6 +173,8 @@ void cClientHandle::Destroy(void) cWorld * World = m_Player->GetWorld(); if (World != nullptr) { + m_Player->StopEveryoneFromTargetingMe(); + m_Player->SetIsTicking(false); World->RemovePlayer(m_Player, true); } m_Player->RemoveClientHandle(); @@ -3084,7 +3085,7 @@ void cClientHandle::SocketClosed(void) } if (m_Player != nullptr) { - m_Player->GetWorld()->ScheduleTask(1, [this](cWorld & World) + m_Player->GetWorld()->QueueTask([this](cWorld & World) { UNUSED(World); Destroy(); |