diff options
author | Ben Deutsch <ben@bendeutsch.de> | 2017-08-04 05:58:10 +0200 |
---|---|---|
committer | rubenwardy <rubenwardy@gmail.com> | 2017-08-12 19:37:53 +0100 |
commit | 9ef9c72e5ac71e0877bad9552f18bd0e9e3885ea (patch) | |
tree | 1af87ef4bc291979dc237a10c5790735c9429fa1 /src/clouds.cpp | |
parent | 7e23532bc2982fe8c3b23eb8f3b536184b43021f (diff) | |
download | minetest-9ef9c72e5ac71e0877bad9552f18bd0e9e3885ea.tar.gz minetest-9ef9c72e5ac71e0877bad9552f18bd0e9e3885ea.tar.bz2 minetest-9ef9c72e5ac71e0877bad9552f18bd0e9e3885ea.zip |
Remove cloud_height setting
With the cloud API, the cloud_height setting has become obsolete
and replaceable by a mod. It, and supporting code, can be
removed.
Diffstat (limited to 'src/clouds.cpp')
-rw-r--r-- | src/clouds.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/clouds.cpp b/src/clouds.cpp index eeac774a9..a8c27f42a 100644 --- a/src/clouds.cpp +++ b/src/clouds.cpp @@ -37,14 +37,12 @@ static constexpr const float cloud_size = BS * 64.0f; static void cloud_3d_setting_changed(const std::string &settingname, void *data) { - // TODO: only re-read cloud settings, not height or radius ((Clouds *)data)->readSettings(); } Clouds::Clouds(scene::ISceneManager* mgr, s32 id, - u32 seed, - s16 cloudheight + u32 seed ): scene::ISceneNode(mgr->getRootSceneNode(), mgr, id), m_seed(seed) @@ -58,13 +56,13 @@ Clouds::Clouds(scene::ISceneManager* mgr, //m_material.MaterialType = video::EMT_TRANSPARENT_VERTEX_ALPHA; m_material.MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL; + m_params.height = 120; m_params.density = 0.4f; m_params.thickness = 16.0f; m_params.color_bright = video::SColor(229, 240, 240, 255); m_params.color_ambient = video::SColor(255, 0, 0, 0); m_params.speed = v2f(0.0f, -2.0f); - m_passed_cloud_y = cloudheight; readSettings(); g_settings->registerChangedCallback("enable_3d_clouds", &cloud_3d_setting_changed, this); @@ -370,8 +368,6 @@ void Clouds::update(const v3f &camera_p, const video::SColorf &color_diffuse) void Clouds::readSettings() { - m_params.height = (m_passed_cloud_y ? m_passed_cloud_y : - g_settings->getS16("cloud_height")); m_cloud_radius_i = g_settings->getU16("cloud_radius"); m_enable_3d = g_settings->getBool("enable_3d_clouds"); } |