From 389062a1ed8063d82ddd611f3426c9b2b088e0fc Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Thu, 22 Mar 2012 15:53:40 +0000 Subject: Fixed a deadlock by removing clients from all chunks upon their exit, not using the clients chunklists. git-svn-id: http://mc-server.googlecode.com/svn/trunk@426 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cChunkMap.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source/cChunkMap.h') diff --git a/source/cChunkMap.h b/source/cChunkMap.h index f2d55b6b8..ea93db80b 100644 --- a/source/cChunkMap.h +++ b/source/cChunkMap.h @@ -102,8 +102,8 @@ public: /// Removes the client from the chunk void RemoveChunkClient(int a_ChunkX, int a_ChunkY, int a_ChunkZ, cClientHandle * a_Client); - /// Removes the client from all chunks specified - void RemoveClientFromChunks(cClientHandle * a_Client, const cChunkCoordsList & a_Chunks); + /// Removes the client from all chunks it is present in + void RemoveClientFromChunks(cClientHandle * a_Client); /// Moves the entity from its current chunk to the new chunk specified void MoveEntityToChunk(cEntity * a_Entity, int a_ChunkX, int a_ChunkY, int a_ChunkZ); @@ -162,6 +162,8 @@ private: void Tick( float a_Dt, MTRand & a_TickRand ); + void RemoveClient(cClientHandle * a_Client); + protected: cChunkPtr m_Chunks[LAYER_SIZE * LAYER_SIZE]; -- cgit v1.2.3