]> git.lizzy.rs Git - minetest.git/commitdiff
Always add increment when getting node interior light
authorx2048 <codeforsmile@gmail.com>
Sun, 4 Sep 2022 20:17:04 +0000 (22:17 +0200)
committerSmallJoker <SmallJoker@users.noreply.github.com>
Sun, 30 Oct 2022 15:53:45 +0000 (16:53 +0100)
src/client/mapblock_mesh.cpp

index 519932cd44d259a043cce63a03f884ccde802142..9e141e29005eb85647e29d75e943b5645c0b39f9 100644 (file)
@@ -103,8 +103,7 @@ static u8 getInteriorLight(enum LightBank bank, MapNode n, s32 increment,
        const NodeDefManager *ndef)
 {
        u8 light = n.getLight(bank, ndef->getLightingFlags(n));
-       if (light > 0)
-               light = rangelim(light + increment, 0, LIGHT_SUN);
+       light = rangelim(light + increment, 0, LIGHT_SUN);
        return decode_light(light);
 }