From 8fc9e7eb117849202b87bf3d764cd3eac6f68c74 Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Sun, 7 Jun 2020 14:17:32 +0200 Subject: [PATCH] GenericCAO: Fix glow not working since a08d18a --- src/client/content_cao.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); -- 2.25.1