diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-07-07 00:50:22 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-07-07 00:50:22 +0200 |
commit | 9e44b0aae164f2456a452714f869cc9670732d8e (patch) | |
tree | 952cf9c8aca9c1b200b8285586e48e50a0188667 /src/World.h | |
parent | Fixed OpenSSL programs and tests being generated when testing disabled. (diff) | |
download | cuberite-9e44b0aae164f2456a452714f869cc9670732d8e.tar cuberite-9e44b0aae164f2456a452714f869cc9670732d8e.tar.gz cuberite-9e44b0aae164f2456a452714f869cc9670732d8e.tar.bz2 cuberite-9e44b0aae164f2456a452714f869cc9670732d8e.tar.lz cuberite-9e44b0aae164f2456a452714f869cc9670732d8e.tar.xz cuberite-9e44b0aae164f2456a452714f869cc9670732d8e.tar.zst cuberite-9e44b0aae164f2456a452714f869cc9670732d8e.zip |
Diffstat (limited to '')
-rw-r--r-- | src/World.h | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/World.h b/src/World.h index 32e64c8e0..4f39ce231 100644 --- a/src/World.h +++ b/src/World.h @@ -242,7 +242,8 @@ public: /** If there is a block entity at the specified coords, sends it to the client specified */ void SendBlockEntity(int a_BlockX, int a_BlockY, int a_BlockZ, cClientHandle & a_Client); - void MarkChunkDirty (int a_ChunkX, int a_ChunkZ); + void MarkRedstoneDirty(int a_ChunkX, int a_ChunkZ); + void MarkChunkDirty (int a_ChunkX, int a_ChunkZ, bool a_MarkRedstoneDirty = false); void MarkChunkSaving(int a_ChunkX, int a_ChunkZ); void MarkChunkSaved (int a_ChunkX, int a_ChunkZ); @@ -635,18 +636,6 @@ public: // tolua_end - inline static void BlockToChunk( int a_X, int a_Y, int a_Z, int & a_ChunkX, int & a_ChunkY, int & a_ChunkZ ) - { - // TODO: Use floor() instead of weird if statements - // Also fix Y - (void)a_Y; // not unused anymore - a_ChunkX = a_X/cChunkDef::Width; - if(a_X < 0 && a_X % cChunkDef::Width != 0) a_ChunkX--; - a_ChunkY = 0; - a_ChunkZ = a_Z/cChunkDef::Width; - if(a_Z < 0 && a_Z % cChunkDef::Width != 0) a_ChunkZ--; - } - /** Saves all chunks immediately. Dangerous interface, may deadlock, use QueueSaveAllChunks() instead */ void SaveAllChunks(void); |