Skip to content
Permalink
Browse files

GenericCAO: Fix dark model below y = 0

Move point at which light is sampled up to 0.5 nodes above foot level,
to avoid that point sometimes passing into the node below causing the
model to go dark.
  • Loading branch information...
paramat committed Jul 26, 2017
1 parent d1a1304 commit 238d752fa3021fa7294a4df79bfa0b8a46f4a018
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/content_cao.cpp
@@ -946,7 +946,7 @@ void GenericCAO::updateLightNoCheck(u8 light_at_pos)

v3s16 GenericCAO::getLightPosition()
{
return floatToInt(m_position, BS);
return floatToInt(m_position + v3f(0, 0.5 * BS, 0), BS);
}

void GenericCAO::updateNodePos()

0 comments on commit 238d752

Please sign in to comment.
You can’t perform that action at this time.