]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/client/content_cao.h
Improve client-side packet receiving
[dragonfireclient.git] / src / client / content_cao.h
index aef1f1296afa3f1d44301716f35f51cd96437345..2c2d1107760d26449489303385cd73dd4a22d921 100644 (file)
@@ -154,13 +154,15 @@ class GenericCAO : public ClientActiveObject
 
        virtual bool getSelectionBox(aabb3f *toset) const;
 
-       v3f getPosition();
+       const v3f getPosition() const;
 
-       inline const v3f &getRotation()
+       void setPosition(const v3f &pos)
        {
-               return m_rotation;
+               pos_translator.val_current = pos;
        }
 
+       inline const v3f &getRotation() const { return m_rotation; }
+
        const bool isImmortal();
 
        scene::ISceneNode *getSceneNode();
@@ -180,6 +182,12 @@ class GenericCAO : public ClientActiveObject
                return m_matrixnode->getRelativeTransformationMatrix();
        }
 
+       inline const core::matrix4 &getAbsolutePosRotMatrix() const
+       {
+               assert(m_matrixnode);
+               return m_matrixnode->getAbsoluteTransformation();
+       }
+
        inline f32 getStepHeight() const
        {
                return m_prop.stepheight;