X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fsky.h;h=5023cc68264581fac36cb021abfc93fe4b1afd12;hb=ad5ac39d8d1a8b8f6f0fe077e20bac914ddc624b;hp=d7dabedb80640315520de95c81ffa92d1ac1dc5d;hpb=09970b7b6daa82ba0cb71540ebb70e671637782f;p=oweals%2Fminetest.git diff --git a/src/sky.h b/src/sky.h index d7dabedb8..5023cc682 100644 --- a/src/sky.h +++ b/src/sky.h @@ -27,12 +27,15 @@ with this program; if not, write to the Free Software Foundation, Inc., #define SKY_MATERIAL_COUNT 5 #define SKY_STAR_COUNT 200 +class ITextureSource; + // Skybox, rendered with zbuffer turned off, before all other nodes. class Sky : public scene::ISceneNode { public: //! constructor - Sky(scene::ISceneNode* parent, scene::ISceneManager* mgr, s32 id); + Sky(scene::ISceneNode* parent, scene::ISceneManager* mgr, s32 id, + ITextureSource *tsrc); virtual void OnRegisterSceneNode(); @@ -79,7 +82,8 @@ private: { 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