1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Add player:override_day_night_ratio() for arbitrarily controlling sunlight brightness

This commit is contained in:
Perttu Ahola 2013-10-18 11:53:19 +03:00 committed by sapier
parent 86a6cca3cf
commit 6a3fa9df12
11 changed files with 107 additions and 2 deletions

View file

@ -2498,6 +2498,12 @@ void the_game(
delete event.set_sky.type;
delete event.set_sky.params;
}
else if (event.type == CE_OVERRIDE_DAY_NIGHT_RATIO)
{
bool enable = event.override_day_night_ratio.do_override;
u32 value = event.override_day_night_ratio.ratio_f * 1000;
client.getEnv().setDayNightRatioOverride(enable, value);
}
}
}