summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-01-26 09:52:35 +0100
committerMattes D <github@xoft.cz>2015-01-26 09:52:35 +0100
commit4a732cc80e94d552703369550c05c315a5188e41 (patch)
treeb2dcbc83c9e1144e5cfad602ad5ccbe706904302
parentGamosocm support (diff)
parentfix logic bug in cChunk::FastSetBlock filtering out leaves meta changes (diff)
downloadcuberite-4a732cc80e94d552703369550c05c315a5188e41.tar
cuberite-4a732cc80e94d552703369550c05c315a5188e41.tar.gz
cuberite-4a732cc80e94d552703369550c05c315a5188e41.tar.bz2
cuberite-4a732cc80e94d552703369550c05c315a5188e41.tar.lz
cuberite-4a732cc80e94d552703369550c05c315a5188e41.tar.xz
cuberite-4a732cc80e94d552703369550c05c315a5188e41.tar.zst
cuberite-4a732cc80e94d552703369550c05c315a5188e41.zip
-rw-r--r--src/Chunk.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/Chunk.cpp b/src/Chunk.cpp
index 979492b46..a4198c322 100644
--- a/src/Chunk.cpp
+++ b/src/Chunk.cpp
@@ -1570,12 +1570,18 @@ void cChunk::FastSetBlock(int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE a_BlockT
if (
a_SendToClients && // ... we are told to do so AND ...
(
- (OldBlockMeta != a_BlockMeta) || // ... the meta value is different OR ...
- !( // ... the old and new blocktypes AREN'T liquids (because client doesn't need to distinguish betwixt them):
- ((OldBlockType == E_BLOCK_STATIONARY_WATER) && (a_BlockType == E_BLOCK_WATER)) || // Replacing stationary water with water
- ((OldBlockType == E_BLOCK_WATER) && (a_BlockType == E_BLOCK_STATIONARY_WATER)) || // Replacing water with stationary water
- ((OldBlockType == E_BLOCK_STATIONARY_LAVA) && (a_BlockType == E_BLOCK_LAVA)) || // Replacing stationary water with water
- ((OldBlockType == E_BLOCK_LAVA) && (a_BlockType == E_BLOCK_STATIONARY_LAVA)) // Replacing water with stationary water
+ !( // ... the old and new blocktypes AREN'T leaves (because the client doesn't need meta updates)
+ ((OldBlockType == E_BLOCK_LEAVES) && (a_BlockType == E_BLOCK_LEAVES)) ||
+ ((OldBlockType == E_BLOCK_NEW_LEAVES) && (a_BlockType == E_BLOCK_NEW_LEAVES))
+ ) && // ... AND ...
+ (
+ (OldBlockMeta != a_BlockMeta) || // ... the meta value is different OR ...
+ !( // ... the old and new blocktypes AREN'T liquids (because client doesn't need to distinguish betwixt them):
+ ((OldBlockType == E_BLOCK_STATIONARY_WATER) && (a_BlockType == E_BLOCK_WATER)) || // Replacing stationary water with water
+ ((OldBlockType == E_BLOCK_WATER) && (a_BlockType == E_BLOCK_STATIONARY_WATER)) || // Replacing water with stationary water
+ ((OldBlockType == E_BLOCK_STATIONARY_LAVA) && (a_BlockType == E_BLOCK_LAVA)) || // Replacing stationary water with water
+ ((OldBlockType == E_BLOCK_LAVA) && (a_BlockType == E_BLOCK_STATIONARY_LAVA)) // Replacing water with stationary water
+ )
)
)
)