diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-04-06 19:29:19 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-04-06 19:29:19 +0200 |
commit | ee5d38b3d5b994425776ca9fe19ce0bdc8f70c8f (patch) | |
tree | 9192f51145292951c15c258b1464532fdea7efea /src/object.hpp | |
parent | 683b6838786b28ee3398ae9580cfaa8e003f084f (diff) |
bring back update_world resync on entity moved
Diffstat (limited to 'src/object.hpp')
-rw-r--r-- | src/object.hpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/object.hpp b/src/object.hpp index ae930259..66cf4d6b 100644 --- a/src/object.hpp +++ b/src/object.hpp @@ -43,6 +43,7 @@ struct object fm_DECLARE_DELETED_COPY_ASSIGNMENT(object); const object_id id = 0; + uint64_t last_frame_no = 0; class chunk* const c; const std::shared_ptr<anim_atlas> atlas; const global_coords coord; @@ -71,7 +72,7 @@ struct object virtual object_type type() const noexcept = 0; virtual bool can_activate(size_t i) const; virtual bool activate(size_t i); - virtual void update(size_t i, const Ns& dt) = 0; + virtual void update(size_t& i, const Ns& dt) = 0; void rotate(size_t i, rotation r); bool can_rotate(global_coords coord, rotation new_r, rotation old_r, Vector2b offset, Vector2b bbox_offset, Vector2ub bbox_size); bool can_move_to(Vector2i delta, global_coords coord, Vector2b offset, Vector2b bbox_offset, Vector2ub bbox_aize); |