summaryrefslogtreecommitdiffstats
path: root/source/cChunkMap.h
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-02-21 16:18:02 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-02-21 16:18:02 +0100
commitf0145ee9fa09ce2c27b8149fee37c6f5fce7e1da (patch)
tree9eaa3d17bbeda373649470cd5ce060c4fbf76b58 /source/cChunkMap.h
parentOptimized hightmap recalc when setting a chunk's block (diff)
downloadcuberite-f0145ee9fa09ce2c27b8149fee37c6f5fce7e1da.tar
cuberite-f0145ee9fa09ce2c27b8149fee37c6f5fce7e1da.tar.gz
cuberite-f0145ee9fa09ce2c27b8149fee37c6f5fce7e1da.tar.bz2
cuberite-f0145ee9fa09ce2c27b8149fee37c6f5fce7e1da.tar.lz
cuberite-f0145ee9fa09ce2c27b8149fee37c6f5fce7e1da.tar.xz
cuberite-f0145ee9fa09ce2c27b8149fee37c6f5fce7e1da.tar.zst
cuberite-f0145ee9fa09ce2c27b8149fee37c6f5fce7e1da.zip
Diffstat (limited to 'source/cChunkMap.h')
-rw-r--r--source/cChunkMap.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/cChunkMap.h b/source/cChunkMap.h
index 2ab8ea0d0..026594f11 100644
--- a/source/cChunkMap.h
+++ b/source/cChunkMap.h
@@ -59,6 +59,15 @@ public:
/// Compares clients of two chunks, calls the callback accordingly
void CompareChunkClients(int a_ChunkX1, int a_ChunkY1, int a_ChunkZ1, int a_ChunkX2, int a_ChunkY2, int a_ChunkZ2, cClientDiffCallback & a_Callback);
+
+ /// Adds client to a chunk, if not already present; returns true if added, false if present
+ bool AddChunkClient(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);
+
+ /// Sends a chunk to client, returns true if successful, false if not sent
+ bool SendChunkTo(int a_ChunkX, int a_ChunkY, int a_ChunkZ, 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);