mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Cleanup in flat lighting (#7051)
This commit is contained in:
parent
e7f1611991
commit
f5fd4a0af1
2 changed files with 2 additions and 42 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue