]> git.lizzy.rs Git - minetest.git/blobdiff - src/sky.h
Add NodeResolver and clean up node name -> content ID resolution system
[minetest.git] / src / sky.h
index d7dabedb80640315520de95c81ffa92d1ac1dc5d..4af6be0246bbfaeb5f1d3b847d398915e47a8948 100644 (file)
--- a/src/sky.h
+++ b/src/sky.h
@@ -79,7 +79,8 @@ class Sky : public scene::ISceneNode
        {
                if (!m_sunlight_seen)
                        return 0;
-               float x; m_time_of_day >= 0.5 ? x = (1 - m_time_of_day) * 2 : x = m_time_of_day * 2;
+               float x = m_time_of_day >= 0.5 ? (1 - m_time_of_day) * 2 : m_time_of_day * 2;
+
                if (x <= 0.3)
                        return 0;
                if (x <= 0.4) // when the sun and moon are aligned