diff options
author | Tommy Santerre <tommy.santerre@gmail.com> | 2015-02-14 23:11:38 +0100 |
---|---|---|
committer | Tommy Santerre <tommy.santerre@gmail.com> | 2015-03-20 01:32:17 +0100 |
commit | 3f6d823aa41f1a7641fb686cf24561b0aca95798 (patch) | |
tree | a695c90473a2de9ebd4fb91b9716b97d8ab929be /src/Chunk.cpp | |
parent | APIDump: Added inheritance checking. (diff) | |
download | cuberite-3f6d823aa41f1a7641fb686cf24561b0aca95798.tar cuberite-3f6d823aa41f1a7641fb686cf24561b0aca95798.tar.gz cuberite-3f6d823aa41f1a7641fb686cf24561b0aca95798.tar.bz2 cuberite-3f6d823aa41f1a7641fb686cf24561b0aca95798.tar.lz cuberite-3f6d823aa41f1a7641fb686cf24561b0aca95798.tar.xz cuberite-3f6d823aa41f1a7641fb686cf24561b0aca95798.tar.zst cuberite-3f6d823aa41f1a7641fb686cf24561b0aca95798.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Chunk.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Chunk.cpp b/src/Chunk.cpp index 00ac1fdb1..1e5481826 100644 --- a/src/Chunk.cpp +++ b/src/Chunk.cpp @@ -931,7 +931,7 @@ void cChunk::ApplyWeatherToTop() FastSetBlock(X, Height, Z, E_BLOCK_SNOW, TopMeta - 1); } } - else if (cBlockInfo::IsSnowable(TopBlock) && (Height + 1 < cChunkDef::Height)) + else if (cBlockInfo::IsSnowable(TopBlock) && (Height < cChunkDef::Height - 1)) { SetBlock(X, Height + 1, Z, E_BLOCK_SNOW, 0); } @@ -1253,7 +1253,7 @@ bool cChunk::UnboundedRelGetBlockLights(int a_RelX, int a_RelY, int a_RelZ, NIBB bool cChunk::UnboundedRelSetBlock(int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta) { - if ((a_RelY < 0) || (a_RelY > cChunkDef::Height)) + if ((a_RelY < 0) || (a_RelY >= cChunkDef::Height)) { LOGWARNING("UnboundedRelSetBlock(): requesting a block with a_RelY out of range: %d", a_RelY); return false; @@ -1274,7 +1274,7 @@ bool cChunk::UnboundedRelSetBlock(int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE bool cChunk::UnboundedRelFastSetBlock(int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta) { - if ((a_RelY < 0) || (a_RelY > cChunkDef::Height)) + if ((a_RelY < 0) || (a_RelY >= cChunkDef::Height)) { LOGWARNING("UnboundedRelFastSetBlock(): requesting a block with a_RelY out of range: %d", a_RelY); return false; |