1
0
Fork 0
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:
Ben Deutsch 2017-03-17 10:39:47 +01:00 committed by paramat
parent 95409da87d
commit f1d7a26b7c
17 changed files with 357 additions and 50 deletions

View file

@ -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;