aboutsummaryrefslogtreecommitdiff
path: root/src/clouds.cpp
diff options
context:
space:
mode:
authorWeblate <42@minetest.ru>2013-03-30 19:49:52 +0100
committerWeblate <42@minetest.ru>2013-03-30 19:49:52 +0100
commita0566270d9fa075afa36a7e3e68c690b1b23ba90 (patch)
tree6bc88127ee67b7bf4d6a2d6f9d0a9e5f997d1dd1 /src/clouds.cpp
parent0d83bdc3aa9f1077836aacb833ac4ad9bbb9a4f4 (diff)
parent1aa50b13622c1e264044839ecdf0152670dae6ce (diff)
downloadminetest-a0566270d9fa075afa36a7e3e68c690b1b23ba90.tar.gz
minetest-a0566270d9fa075afa36a7e3e68c690b1b23ba90.tar.bz2
minetest-a0566270d9fa075afa36a7e3e68c690b1b23ba90.zip
Merge remote branch 'origin/master'
Diffstat (limited to 'src/clouds.cpp')
-rw-r--r--src/clouds.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/clouds.cpp b/src/clouds.cpp
index 9f0bc06d8..55ec8965a 100644
--- a/src/clouds.cpp
+++ b/src/clouds.cpp
@@ -29,7 +29,8 @@ Clouds::Clouds(
scene::ISceneNode* parent,
scene::ISceneManager* mgr,
s32 id,
- u32 seed
+ u32 seed,
+ s16 cloudheight
):
scene::ISceneNode(parent, mgr, id),
m_seed(seed),
@@ -45,7 +46,8 @@ Clouds::Clouds(
//m_material.MaterialType = video::EMT_TRANSPARENT_VERTEX_ALPHA;
m_material.MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL;
- m_cloud_y = BS * g_settings->getS16("cloud_height");
+ m_cloud_y = BS * (cloudheight ? cloudheight :
+ g_settings->getS16("cloud_height"));
m_box = core::aabbox3d<f32>(-BS*1000000,m_cloud_y-BS,-BS*1000000,
BS*1000000,m_cloud_y+BS,BS*1000000);