summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-04-08 06:22:49 +0200
committerStanislaw Halik <sthalik@misaki.pl>2024-04-08 06:22:49 +0200
commitad052388e4ec5d55adc3eafb1d4974e67341ab67 (patch)
treee3059c77130cf259c82683b05a3fcf24fe9a4953 /src
parentceec1ce9106f21ff1fd42c3b709937079480911b (diff)
b
Diffstat (limited to 'src')
-rw-r--r--src/object.cpp1
-rw-r--r--src/object.hpp1
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;