Skip to content

Commit

Permalink
GenericCAO: Fix dark model below y = 0
Browse files Browse the repository at this point in the history
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 30, 2017
1 parent d1a1304 commit 238d752
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/content_cao.cpp
Expand Up @@ -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()
Expand Down

0 comments on commit 238d752

Please sign in to comment.