]> git.lizzy.rs Git - minetest.git/blobdiff - src/client/content_cao.h
content_cao: Do not expire visuals for texture updates
[minetest.git] / src / client / content_cao.h
index 3a071101f5ff69a7c1e937c965c183b180353988..7693dd3d248305e65113be836168b47ed8f16628 100644 (file)
@@ -125,6 +125,12 @@ class GenericCAO : public ClientActiveObject
        u8 m_last_light = 255;
        bool m_is_visible = false;
        s8 m_glow = 0;
+       // Material
+       video::E_MATERIAL_TYPE m_material_type;
+       // Settings
+       bool m_enable_shaders = false;
+
+       bool visualExpiryRequired(const ObjectProperties &newprops) const;
 
 public:
        GenericCAO(Client *client, ClientEnvironment *env);
@@ -156,13 +162,18 @@ class GenericCAO : public ClientActiveObject
 
        const v3f getPosition() const;
 
+       void setPosition(const v3f &pos)
+       {
+               pos_translator.val_current = pos;
+       }
+
        inline const v3f &getRotation() const { return m_rotation; }
 
        const bool isImmortal();
 
-       scene::ISceneNode *getSceneNode();
+       scene::ISceneNode *getSceneNode() const;
 
-       scene::IAnimatedMeshSceneNode *getAnimatedMeshSceneNode();
+       scene::IAnimatedMeshSceneNode *getAnimatedMeshSceneNode() const;
 
        // m_matrixnode controls the position and rotation of the child node
        // for all scene nodes, as a workaround for an Irrlicht problem with
@@ -225,12 +236,14 @@ class GenericCAO : public ClientActiveObject
                m_visuals_expired = true;
        }
 
-       void updateLight(u8 light_at_pos);
+       void updateLight(u32 day_night_ratio);
 
-       void updateLightNoCheck(u8 light_at_pos);
+       void setNodeLight(u8 light);
 
        v3s16 getLightPosition();
 
+       void updateNametag();
+
        void updateNodePos();
 
        void step(float dtime, ClientEnvironment *env);