From: paramat Date: Wed, 26 Jul 2017 18:46:29 +0000 (+0100) Subject: GenericCAO: Fix dark model below y = 0 X-Git-Tag: 5.0.0~985 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=238d752fa3021fa7294a4df79bfa0b8a46f4a018;p=oweals%2Fminetest.git 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. --- 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()