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:
parent
86a6cca3cf
commit
6a3fa9df12
11 changed files with 107 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue