diff options
author | Bond-009 <bond.009@outlook.com> | 2019-08-11 11:39:43 +0200 |
---|---|---|
committer | peterbell10 <peterbell10@live.co.uk> | 2019-08-11 11:39:43 +0200 |
commit | e0ca4d83991d80865781c1dbbbfa1f92259a366a (patch) | |
tree | 7a1ee18692772befe2c60bd304474fae99d51e1b /src/Blocks/BlockLeaves.h | |
parent | Wake up redstone simulator on slot changes for blockentities (#4348) (diff) | |
download | cuberite-e0ca4d83991d80865781c1dbbbfa1f92259a366a.tar cuberite-e0ca4d83991d80865781c1dbbbfa1f92259a366a.tar.gz cuberite-e0ca4d83991d80865781c1dbbbfa1f92259a366a.tar.bz2 cuberite-e0ca4d83991d80865781c1dbbbfa1f92259a366a.tar.lz cuberite-e0ca4d83991d80865781c1dbbbfa1f92259a366a.tar.xz cuberite-e0ca4d83991d80865781c1dbbbfa1f92259a366a.tar.zst cuberite-e0ca4d83991d80865781c1dbbbfa1f92259a366a.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Blocks/BlockLeaves.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/Blocks/BlockLeaves.h b/src/Blocks/BlockLeaves.h index 0d7500491..c1840c474 100644 --- a/src/Blocks/BlockLeaves.h +++ b/src/Blocks/BlockLeaves.h @@ -11,13 +11,15 @@ #define LEAVES_CHECK_DISTANCE 6 #define PROCESS_NEIGHBOR(x, y, z) \ - switch (a_Area.GetBlockType(x, y, z)) \ - { \ - case E_BLOCK_LEAVES: a_Area.SetBlockType(x, y, z, static_cast<BLOCKTYPE>(E_BLOCK_SPONGE + i + 1)); break; \ - case E_BLOCK_LOG: return true; \ - case E_BLOCK_NEW_LEAVES: a_Area.SetBlockType(x, y, z, static_cast<BLOCKTYPE>(E_BLOCK_SPONGE + i + 1)); break; \ - case E_BLOCK_NEW_LOG: return true; \ - } + do { \ + switch (a_Area.GetBlockType(x, y, z)) \ + { \ + case E_BLOCK_LEAVES: a_Area.SetBlockType(x, y, z, static_cast<BLOCKTYPE>(E_BLOCK_SPONGE + i + 1)); break; \ + case E_BLOCK_LOG: return true; \ + case E_BLOCK_NEW_LEAVES: a_Area.SetBlockType(x, y, z, static_cast<BLOCKTYPE>(E_BLOCK_SPONGE + i + 1)); break; \ + case E_BLOCK_NEW_LOG: return true; \ + } \ + } while (false) bool HasNearLog(cBlockArea &a_Area, int a_BlockX, int a_BlockY, int a_BlockZ); |