Skip to content

Commit 238d752

Browse files
committedJul 30, 2017
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.
1 parent d1a1304 commit 238d752

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

Diff for: ‎src/content_cao.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -946,7 +946,7 @@ void GenericCAO::updateLightNoCheck(u8 light_at_pos)
946946

947947
v3s16 GenericCAO::getLightPosition()
948948
{
949-
return floatToInt(m_position, BS);
949+
return floatToInt(m_position + v3f(0, 0.5 * BS, 0), BS);
950950
}
951951

952952
void GenericCAO::updateNodePos()

0 commit comments

Comments
 (0)
Please sign in to comment.