diff options
author | paramat <paramat@users.noreply.github.com> | 2017-07-26 19:46:29 +0100 |
---|---|---|
committer | paramat <mat.gregory@virginmedia.com> | 2017-07-30 18:40:45 +0100 |
commit | 238d752fa3021fa7294a4df79bfa0b8a46f4a018 (patch) | |
tree | 68507697014ea9e74bc98350e1f4bdd96cd9b3cf | |
parent | d1a130488e5a5f3837479ad7f929beb4c43e81fb (diff) | |
download | minetest-238d752fa3021fa7294a4df79bfa0b8a46f4a018.tar.gz minetest-238d752fa3021fa7294a4df79bfa0b8a46f4a018.tar.bz2 minetest-238d752fa3021fa7294a4df79bfa0b8a46f4a018.zip |
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.
-rw-r--r-- | src/content_cao.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/content_cao.cpp b/src/content_cao.cpp index 993087353..771820cb0 100644 --- a/src/content_cao.cpp +++ b/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() |