]> git.lizzy.rs Git - dragonfireclient.git/commitdiff
Fixed glowing GenericCAOs being rendered completely back when Fullbright is enabled
authorElias Fleckenstein <eliasfleckenstein@web.de>
Thu, 26 Nov 2020 17:46:34 +0000 (18:46 +0100)
committerElias Fleckenstein <eliasfleckenstein@web.de>
Thu, 26 Nov 2020 17:46:34 +0000 (18:46 +0100)
src/client/content_cao.cpp

index aed576372fccdb24e1362de6d6e5b7ab1c538d10..e1cebf461acaec2831ea3425a88aabee0a6ef77b 100644 (file)
@@ -811,9 +811,6 @@ void GenericCAO::updateLight(u32 day_night_ratio)
 
        u8 light_at_pos = 0;
        bool pos_ok = false;
-
-       if (g_settings->getBool("fullbright"))
-               light_at_pos = 255;
                
        v3s16 pos[3];
        u16 npos = getLightPosition(pos);
@@ -830,6 +827,8 @@ void GenericCAO::updateLight(u32 day_night_ratio)
                light_at_pos = blend_light(day_night_ratio, LIGHT_SUN, 0);
 
        u8 light = decode_light(light_at_pos + m_glow);
+       if (g_settings->getBool("fullbright"))
+               light = 255;
        if (light != m_last_light) {
                m_last_light = light;
                setNodeLight(light);