|
@@ -130,18 +130,8 @@ static u8 getInteriorLight(enum LightBank bank, MapNode n, s32 increment,
|
|
const NodeDefManager *ndef)
|
|
const NodeDefManager *ndef)
|
|
{
|
|
{
|
|
u8 light = n.getLight(bank, 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);
|
|
return decode_light(light);
|
|
}
|
|
}
|
|
|
|
|