X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fclouds.cpp;h=55ec8965ad6683b8b146f4ec7e907702c790d66c;hb=b38afc9311e235d2b90d61dbbcf1a18e549073a7;hp=5b980a5ba2ad4e21e94c13ce8b1bccce28c6e36c;hpb=bcc0ca93d463ec7bdf6ff1ef621f7777014c404a;p=dragonfireclient.git diff --git a/src/clouds.cpp b/src/clouds.cpp index 5b980a5ba..55ec8965a 100644 --- a/src/clouds.cpp +++ b/src/clouds.cpp @@ -1,6 +1,6 @@ /* -Minetest-c55 -Copyright (C) 2010-2011 celeron55, Perttu Ahola +Minetest +Copyright (C) 2010-2013 celeron55, Perttu Ahola This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -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(-BS*1000000,m_cloud_y-BS,-BS*1000000, BS*1000000,m_cloud_y+BS,BS*1000000);