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:
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user