]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/sky.cpp
Revert "Fix settings to honor numeric conversion errors"
[dragonfireclient.git] / src / sky.cpp
index efc3cc3c754e3980f9ea8680d391ea66081bcf69..3ba9a44c0b9b9a15532c8f38980e299804da5f7f 100644 (file)
@@ -14,6 +14,8 @@
 //! constructor
 Sky::Sky(scene::ISceneNode* parent, scene::ISceneManager* mgr, s32 id, LocalPlayer* player):
                scene::ISceneNode(parent, mgr, id),
+               m_visible(true),
+               m_fallback_bg_color(255,255,255,255),
                m_first_update(true),
                m_brightness(0.5),
                m_cloud_brightness(0.5),
@@ -77,6 +79,9 @@ const core::aabbox3d<f32>& Sky::getBoundingBox() const
 //! renders the node.
 void Sky::render()
 {
+       if(!m_visible)
+               return;
+
        video::IVideoDriver* driver = SceneManager->getVideoDriver();
        scene::ICameraSceneNode* camera = SceneManager->getActiveCamera();
 
@@ -556,7 +561,7 @@ void Sky::update(float time_of_day, float time_brightness,
                        m_cloudcolor_bright_f.b * m_cloud_brightness,
                        1.0);
        if (m_directional_colored_fog) {
-               m_cloudcolor_f = m_mix_scolorf(m_cloudcolor_f, video::SColorf(pointcolor), m_horizon_blend() * 0.75);
+               m_cloudcolor_f = m_mix_scolorf(m_cloudcolor_f, video::SColorf(pointcolor), m_horizon_blend() * 0.25);
        }
 
 }