diff options
author | Moritz Borcherding <moritz.borcherding@web.de> | 2016-09-18 21:43:30 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2016-09-27 14:32:20 +0200 |
commit | b268db4caae1b5612ae0f3adabf164efc06de368 (patch) | |
tree | a85e615101f7b61f0ebd8c2f73c5068c7b112f88 /src/Blocks | |
parent | APIDump: Fixed description for tolua functions. (diff) | |
download | cuberite-b268db4caae1b5612ae0f3adabf164efc06de368.tar cuberite-b268db4caae1b5612ae0f3adabf164efc06de368.tar.gz cuberite-b268db4caae1b5612ae0f3adabf164efc06de368.tar.bz2 cuberite-b268db4caae1b5612ae0f3adabf164efc06de368.tar.lz cuberite-b268db4caae1b5612ae0f3adabf164efc06de368.tar.xz cuberite-b268db4caae1b5612ae0f3adabf164efc06de368.tar.zst cuberite-b268db4caae1b5612ae0f3adabf164efc06de368.zip |
Diffstat (limited to 'src/Blocks')
-rw-r--r-- | src/Blocks/BlockLeaves.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Blocks/BlockLeaves.h b/src/Blocks/BlockLeaves.h index 84e186b4c..6c2905171 100644 --- a/src/Blocks/BlockLeaves.h +++ b/src/Blocks/BlockLeaves.h @@ -166,7 +166,7 @@ bool HasNearLog(cBlockArea & a_Area, int a_BlockX, int a_BlockY, int a_BlockZ) a_Area.SetBlockType(a_BlockX, a_BlockY, a_BlockZ, E_BLOCK_SPONGE); for (int i = 0; i < LEAVES_CHECK_DISTANCE; i++) { - for (int y = std::max(a_BlockY - i, 0); y <= std::min(a_BlockY + i, 255); y++) + for (int y = std::max(a_BlockY - i, 0); y <= std::min(a_BlockY + i, cChunkDef::Height - 1); y++) { for (int z = a_BlockZ - i; z <= a_BlockZ + i; z++) { |