summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSmallJoker <mk939@ymail.com>2020-06-07 14:17:32 +0200
committerSmallJoker <mk939@ymail.com>2020-06-07 14:17:32 +0200
commit8fc9e7eb117849202b87bf3d764cd3eac6f68c74 (patch)
tree7150b9f531cde20e4fd847c16e88b3a47e6394b6 /src
parente746607d0f8531e3a8b12cc45294aecf36217b17 (diff)
downloadminetest-8fc9e7eb117849202b87bf3d764cd3eac6f68c74.tar.gz
minetest-8fc9e7eb117849202b87bf3d764cd3eac6f68c74.tar.bz2
minetest-8fc9e7eb117849202b87bf3d764cd3eac6f68c74.zip
GenericCAO: Fix glow not working since a08d18a
Diffstat (limited to 'src')
-rw-r--r--src/client/content_cao.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/client/content_cao.cpp b/src/client/content_cao.cpp
index 702d089af..855729642 100644
--- a/src/client/content_cao.cpp
+++ b/src/client/content_cao.cpp
@@ -787,6 +787,9 @@ void GenericCAO::addToScene(ITextureSource *tsrc)
void GenericCAO::updateLight(u32 day_night_ratio)
{
+ if (m_glow < 0)
+ return;
+
u8 light_at_pos = 0;
bool pos_ok;
@@ -797,7 +800,7 @@ void GenericCAO::updateLight(u32 day_night_ratio)
else
light_at_pos = blend_light(day_night_ratio, LIGHT_SUN, 0);
- u8 light = decode_light(light_at_pos);
+ u8 light = decode_light(light_at_pos + m_glow);
if (light != m_last_light) {
m_last_light = light;
setNodeLight(light);