]> git.lizzy.rs Git - minetest.git/blobdiff - src/sky.h
Dungeongen: Fix out-of-voxelmanip access segfault
[minetest.git] / src / sky.h
index 4af6be0246bbfaeb5f1d3b847d398915e47a8948..f1989177351a7c9420459353b5165851ac1e9789 100644 (file)
--- a/src/sky.h
+++ b/src/sky.h
@@ -27,19 +27,23 @@ 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();
 
        //! renders the node.
        virtual void render();
 
-       virtual const core::aabbox3d<f32>& getBoundingBox() const;
+       virtual const aabb3f &getBoundingBox() const
+       { return m_box; }
 
        // Used by Irrlicht for optimizing rendering
        virtual video::SMaterial& getMaterial(u32 i)
@@ -71,7 +75,7 @@ class Sky : public scene::ISceneNode
        }
 
 private:
-       core::aabbox3d<f32> Box;
+       aabb3f m_box;
        video::SMaterial m_materials[SKY_MATERIAL_COUNT];
 
        // How much sun & moon transition should affect horizon color