]> git.localhorst.tv Git - blank.git/blobdiff - src/world/Entity.hpp
update entity model on state change
[blank.git] / src / world / Entity.hpp
index 4f0d3c435f58e709a4c33dba335453f03b75d81b..6affc21762a2bae9354d223c2203e5133d4317fa 100644 (file)
@@ -74,8 +74,7 @@ public:
        /// get a ray in entity's face direction originating from center of vision
        Ray Aim(const Chunk::Pos &chunk_offset) const noexcept;
 
-       void SetState(const EntityState &s) noexcept { state = s; }
-       EntityState &GetState() noexcept { return state; }
+       void SetState(const EntityState &s) noexcept { state = s; UpdateModel(); }
        const EntityState &GetState() const noexcept { return state; }
 
        void Ref() noexcept { ++ref_count; }