mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Add clouds API
This commit is contained in:
parent
95409da87d
commit
f1d7a26b7c
17 changed files with 357 additions and 50 deletions
13
src/game.cpp
13
src/game.cpp
|
@ -3295,6 +3295,19 @@ void Game::processClientEvents(CameraOrientation *cam)
|
|||
event.override_day_night_ratio.ratio_f * 1000);
|
||||
break;
|
||||
|
||||
case CE_CLOUD_PARAMS:
|
||||
if (clouds) {
|
||||
clouds->setDensity(event.cloud_params.density);
|
||||
clouds->setColorBright(video::SColor(event.cloud_params.color_bright));
|
||||
clouds->setColorAmbient(video::SColor(event.cloud_params.color_ambient));
|
||||
clouds->setHeight(event.cloud_params.height);
|
||||
clouds->setThickness(event.cloud_params.thickness);
|
||||
clouds->setSpeed(v2f(
|
||||
event.cloud_params.speed_x,
|
||||
event.cloud_params.speed_y));
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
// unknown or unhandled type
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue