aboutsummaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorBen Deutsch <ben@bendeutsch.de>2017-03-17 10:39:47 +0100
committerparamat <mat.gregory@virginmedia.com>2017-04-30 00:06:13 +0100
commitf1d7a26b7c341b468f34325cec5c3d495f175a8f (patch)
tree9926a816208ec7b9384ba718be739953d9d3d773 /src/game.cpp
parent95409da87d009c352f27c737621972c2225796c9 (diff)
downloadminetest-f1d7a26b7c341b468f34325cec5c3d495f175a8f.tar.gz
minetest-f1d7a26b7c341b468f34325cec5c3d495f175a8f.tar.bz2
minetest-f1d7a26b7c341b468f34325cec5c3d495f175a8f.zip
Add clouds API
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/game.cpp b/src/game.cpp
index a1cc1ab15..ba6530d80 100644
--- a/src/game.cpp
+++ b/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;