]> git.lizzy.rs Git - minetest.git/blobdiff - src/client/content_cao.h
Cleanup ClientLauncher structure (#10160)
[minetest.git] / src / client / content_cao.h
index 8e2a13ea8929d57a2235d7befd9fe2294d4a17d3..974ff9a1eecfd376f52d80639224024dec0468ae 100644 (file)
@@ -188,10 +188,11 @@ class GenericCAO : public ClientActiveObject
                return m_matrixnode->getRelativeTransformationMatrix();
        }
 
-       inline const core::matrix4 &getAbsolutePosRotMatrix() const
+       inline const core::matrix4 *getAbsolutePosRotMatrix() const
        {
-               assert(m_matrixnode);
-               return m_matrixnode->getAbsoluteTransformation();
+               if (!m_matrixnode)
+                       return nullptr;
+               return &m_matrixnode->getAbsoluteTransformation();
        }
 
        inline f32 getStepHeight() const
@@ -236,13 +237,14 @@ class GenericCAO : public ClientActiveObject
                m_visuals_expired = true;
        }
 
-       void updateLight(u8 light_at_pos);
-
-       void updateLightNoCheck(u8 light_at_pos);
+       void updateLight(u32 day_night_ratio);
 
        void setNodeLight(u8 light);
 
-       v3s16 getLightPosition();
+       /* Get light position(s).
+        * returns number of positions written into pos[], which must have space
+        * for at least 3 vectors. */
+       u16 getLightPosition(v3s16 *pos);
 
        void updateNametag();