Make cloud height user-configurable
authorkwolekr <mirrorisim@gmail.com>
Mon, 29 Oct 2012 01:35:19 +0000 (21:35 -0400)
committerPerttu Ahola <celeron55@gmail.com>
Mon, 21 Jan 2013 19:41:09 +0000 (21:41 +0200)
src/clouds.cpp
src/defaultsettings.cpp

index 146eeb8310d9ecb09f8bfe03dadade7fd4f51c4a..5b980a5ba2ad4e21e94c13ce8b1bccce28c6e36c 100644 (file)
@@ -45,8 +45,7 @@ Clouds::Clouds(
        //m_material.MaterialType = video::EMT_TRANSPARENT_VERTEX_ALPHA;
        m_material.MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL;
 
-       m_cloud_y = BS*100;
-       //m_cloud_y = BS*50;
+       m_cloud_y = BS * 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);
index 163e99c6975d9d79b568eca057add8051a44d27d..db7df6edc441356d4e0c89703264c1269776d5ea 100644 (file)
@@ -107,6 +107,7 @@ void set_default_settings(Settings *settings)
        settings->setDefault("screenshot_path", ".");
        settings->setDefault("view_bobbing_amount", "1.0");
        settings->setDefault("enable_3d_clouds", "true");
+       settings->setDefault("cloud_height", "120");
        settings->setDefault("opaque_water", "false");
        settings->setDefault("console_color", "(0,0,0)");
        settings->setDefault("console_alpha", "200");