1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-14 00:55:20 +02:00

Cleanup in flat lighting (#7051)

This commit is contained in:
Vitaliy
2018-03-03 12:58:45 +03:00
committed by SmallJoker
parent e7f1611991
commit f5fd4a0af1
2 changed files with 2 additions and 42 deletions

View File

@@ -130,18 +130,8 @@ static u8 getInteriorLight(enum LightBank bank, MapNode n, s32 increment,
const NodeDefManager *ndef)
{
u8 light = n.getLight(bank, ndef);
while(increment > 0)
{
light = undiminish_light(light);
--increment;
}
while(increment < 0)
{
light = diminish_light(light);
++increment;
}
if (light > 0)
light = rangelim(light + increment, 0, LIGHT_SUN);
return decode_light(light);
}