]> git.lizzy.rs Git - minetest.git/commitdiff
Fix CAO light calculation issue
authorsfan5 <sfan5@live.de>
Sun, 19 Jun 2022 11:30:11 +0000 (13:30 +0200)
committersfan5 <sfan5@live.de>
Sun, 19 Jun 2022 11:30:11 +0000 (13:30 +0200)
src/client/content_cao.cpp

index 4d296e6ef0ff1801381255b183b467163ed0a6a4..e603b5a21fd9c0b13c7fa79b53fd671eecb9976f 100644 (file)
@@ -872,7 +872,7 @@ void GenericCAO::updateLight(u32 day_night_ratio)
                MapNode n = m_env->getMap().getNode(pos[i], &this_ok);
                if (this_ok) {
                        u16 this_light = getInteriorLight(n, 0, m_client->ndef());
-                       u8 this_light_intensity = MYMAX(this_light & 0xFF, (this_light >> 8) && 0xFF);
+                       u8 this_light_intensity = MYMAX(this_light & 0xFF, this_light >> 8);
                        if (this_light_intensity > light_at_pos_intensity) {
                                light_at_pos = this_light;
                                light_at_pos_intensity = this_light_intensity;