diff options
author | Samuel Barney <samjbarney@gmail.com> | 2013-10-30 23:14:42 +0100 |
---|---|---|
committer | Samuel Barney <samjbarney@gmail.com> | 2013-10-30 23:14:42 +0100 |
commit | 7157c392fa81f699ec66a5eda495a9bad465ea81 (patch) | |
tree | ff7deecfc14da7be6f574e14ab2d6efbdcbadd9c | |
parent | Changes based on madmaxoft's nitpicker notes. (diff) | |
download | cuberite-7157c392fa81f699ec66a5eda495a9bad465ea81.tar cuberite-7157c392fa81f699ec66a5eda495a9bad465ea81.tar.gz cuberite-7157c392fa81f699ec66a5eda495a9bad465ea81.tar.bz2 cuberite-7157c392fa81f699ec66a5eda495a9bad465ea81.tar.lz cuberite-7157c392fa81f699ec66a5eda495a9bad465ea81.tar.xz cuberite-7157c392fa81f699ec66a5eda495a9bad465ea81.tar.zst cuberite-7157c392fa81f699ec66a5eda495a9bad465ea81.zip |
Diffstat (limited to '')
-rw-r--r-- | source/Chunk.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/Chunk.cpp b/source/Chunk.cpp index b38f5ea19..be75eae41 100644 --- a/source/Chunk.cpp +++ b/source/Chunk.cpp @@ -2789,6 +2789,7 @@ Vector3i cChunk::PositionToWorldPosition(int a_RelX, int a_RelY, int a_RelZ) NIBBLETYPE cChunk::GetTimeAlteredLight(NIBBLETYPE a_Skylight) const { a_Skylight -= m_World->GetSkyDarkness(); + // Because NIBBLETYPE is unsigned, we clamp it to 0 .. 15 by checking for values above 15 return (a_Skylight < 16)? a_Skylight : 0; } |