From 7157c392fa81f699ec66a5eda495a9bad465ea81 Mon Sep 17 00:00:00 2001 From: Samuel Barney Date: Wed, 30 Oct 2013 16:14:42 -0600 Subject: Last of the nitpicker note fixes. Added some inline commenting. --- source/Chunk.cpp | 1 + 1 file changed, 1 insertion(+) 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; } -- cgit v1.2.3