diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/object.cpp | 1 | ||||
-rw-r--r-- | src/object.hpp | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/object.cpp b/src/object.cpp index 47383bf1..03491de3 100644 --- a/src/object.cpp +++ b/src/object.cpp @@ -348,6 +348,7 @@ void object::set_bbox(Vector2b offset_, Vector2b bb_offset_, Vector2ub bb_size_, bool object::can_activate(size_t) const { return false; } bool object::activate(size_t) { return false; } class chunk& object::chunk() const { return *c; } +class world& object::world() const { return c->world(); } bool object::is_virtual() const { return false; } point object::position() const { return {coord, offset}; } object_type object::type_of() const noexcept { return type(); } diff --git a/src/object.hpp b/src/object.hpp index 66cf4d6b..4d2279e1 100644 --- a/src/object.hpp +++ b/src/object.hpp @@ -63,6 +63,7 @@ struct object float ordinal() const; float ordinal(local_coords xy, Vector2b offset, Vector2s z_offset) const; class chunk& chunk() const; + class world& world() const; size_t index() const; virtual bool is_virtual() const; point position() const; |