summaryrefslogtreecommitdiffstats
path: root/src/Chunk.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2020-08-26 22:45:13 +0200
committerTiger Wang <ziwei.tiger@outlook.com>2020-08-28 22:08:06 +0200
commitb084f1f13fdd73e10fe296ef7d48a3c8beb95585 (patch)
tree84f4c6dc62444de0dbf5e89436ab898143bf683b /src/Chunk.cpp
parent1.13+: Send length-prefixed server Brand string (diff)
downloadcuberite-b084f1f13fdd73e10fe296ef7d48a3c8beb95585.tar
cuberite-b084f1f13fdd73e10fe296ef7d48a3c8beb95585.tar.gz
cuberite-b084f1f13fdd73e10fe296ef7d48a3c8beb95585.tar.bz2
cuberite-b084f1f13fdd73e10fe296ef7d48a3c8beb95585.tar.lz
cuberite-b084f1f13fdd73e10fe296ef7d48a3c8beb95585.tar.xz
cuberite-b084f1f13fdd73e10fe296ef7d48a3c8beb95585.tar.zst
cuberite-b084f1f13fdd73e10fe296ef7d48a3c8beb95585.zip
Diffstat (limited to '')
-rw-r--r--src/Chunk.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/Chunk.cpp b/src/Chunk.cpp
index afbc3adca..1d5908c5f 100644
--- a/src/Chunk.cpp
+++ b/src/Chunk.cpp
@@ -1290,7 +1290,7 @@ void cChunk::SetBlock(Vector3i a_RelPos, BLOCKTYPE a_BlockType, NIBBLETYPE a_Blo
-void cChunk::FastSetBlock(int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE a_BlockType, BLOCKTYPE a_BlockMeta, bool a_SendToClients)
+void cChunk::FastSetBlock(int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE a_BlockType, BLOCKTYPE a_BlockMeta)
{
ASSERT(!((a_RelX < 0) || (a_RelX >= Width) || (a_RelY < 0) || (a_RelY >= Height) || (a_RelZ < 0) || (a_RelZ >= Width)));
@@ -1319,15 +1319,12 @@ void cChunk::FastSetBlock(int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE a_BlockT
// Queue block to be sent only if ...
if (
- a_SendToClients && // ... we are told to do so AND ...
+ !( // ... 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 ...
(
- !( // ... 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) || (!ReplacingLiquids)
- )
+ (OldBlockMeta != a_BlockMeta) || (!ReplacingLiquids)
)
)
{