summaryrefslogtreecommitdiffstats
path: root/source/cClientHandle.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-03-22 16:53:40 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-03-22 16:53:40 +0100
commit389062a1ed8063d82ddd611f3426c9b2b088e0fc (patch)
tree50fb81d24e7849bed22b1acf04cad62f9b514450 /source/cClientHandle.cpp
parentAdded core.build permission to Core. Without this permission players are unable to build (diff)
downloadcuberite-389062a1ed8063d82ddd611f3426c9b2b088e0fc.tar
cuberite-389062a1ed8063d82ddd611f3426c9b2b088e0fc.tar.gz
cuberite-389062a1ed8063d82ddd611f3426c9b2b088e0fc.tar.bz2
cuberite-389062a1ed8063d82ddd611f3426c9b2b088e0fc.tar.lz
cuberite-389062a1ed8063d82ddd611f3426c9b2b088e0fc.tar.xz
cuberite-389062a1ed8063d82ddd611f3426c9b2b088e0fc.tar.zst
cuberite-389062a1ed8063d82ddd611f3426c9b2b088e0fc.zip
Diffstat (limited to 'source/cClientHandle.cpp')
-rw-r--r--source/cClientHandle.cpp11
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();
}