diff options
Diffstat (limited to '')
-rw-r--r-- | source/cClientHandle.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source/cClientHandle.cpp b/source/cClientHandle.cpp index d7b1aa55c..3df4b36b2 100644 --- a/source/cClientHandle.cpp +++ b/source/cClientHandle.cpp @@ -461,14 +461,17 @@ void cClientHandle::StreamChunk(int a_ChunkX, int a_ChunkY, int a_ChunkZ) // Removes the client from all chunks. Used when switching worlds or destroying the player
void cClientHandle::RemoveFromAllChunks()
{
- cCSLock Lock(m_CSChunkLists);
cWorld * World = m_Player->GetWorld();
if (World != NULL)
{
- World->RemoveClientFromChunks(this, m_LoadedChunks);
+ World->RemoveClientFromChunks(this);
+ }
+
+ {
+ cCSLock Lock(m_CSChunkLists);
+ m_LoadedChunks.clear();
+ m_ChunksToSend.clear();
}
- m_LoadedChunks.clear();
- m_ChunksToSend.clear();
}
|