diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-09-01 22:27:30 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-09-01 22:27:30 +0200 |
commit | 31fd5bbc08234686cf798a93a18e0bb73615d1bf (patch) | |
tree | 59b964d01885916c5d49fef3c168ff10dcbdd93f /src/chunk-collision.cpp | |
parent | 053ea3aa1c443c368f8b43591e3e970e12b50c70 (diff) |
rename entity -> object
Diffstat (limited to 'src/chunk-collision.cpp')
-rw-r--r-- | src/chunk-collision.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/chunk-collision.cpp b/src/chunk-collision.cpp index 9810cee3..db7f3ede 100644 --- a/src/chunk-collision.cpp +++ b/src/chunk-collision.cpp @@ -1,6 +1,6 @@ #include "chunk.hpp" #include "tile-atlas.hpp" -#include "entity.hpp" +#include "object.hpp" #include "src/RTree-search.hpp" #include "src/chunk-scenery.hpp" #include "src/tile-bbox.hpp" @@ -22,7 +22,7 @@ constexpr object_id make_id(collision_type type, pass_mode p, object_id id) void chunk::ensure_passability() noexcept { - fm_assert(_entities_sorted); // not strictly necessary + fm_assert(_objects_sorted); // not strictly necessary if (!_pass_modified) return; @@ -30,7 +30,7 @@ void chunk::ensure_passability() noexcept _rtree.RemoveAll(); - for (const std::shared_ptr<entity>& s : entities()) + for (const std::shared_ptr<object>& s : objects()) { bbox box; if (_bbox_for_scenery(*s, box)) @@ -64,7 +64,7 @@ void chunk::ensure_passability() noexcept } } -bool chunk::_bbox_for_scenery(const entity& s, local_coords local, Vector2b offset, Vector2b bbox_offset, Vector2ub bbox_size, bbox& value) noexcept +bool chunk::_bbox_for_scenery(const object& s, local_coords local, Vector2b offset, Vector2b bbox_offset, Vector2ub bbox_size, bbox& value) noexcept { auto [start, end] = scenery_tile(local, offset, bbox_offset, bbox_size); auto id = make_id(collision_type::scenery, s.pass, s.id); @@ -72,7 +72,7 @@ bool chunk::_bbox_for_scenery(const entity& s, local_coords local, Vector2b offs return s.atlas && !Vector2ui(s.bbox_size).isZero(); } -bool chunk::_bbox_for_scenery(const entity& s, bbox& value) noexcept +bool chunk::_bbox_for_scenery(const object& s, bbox& value) noexcept { return _bbox_for_scenery(s, s.coord.local(), s.offset, s.bbox_offset, s.bbox_size, value); } @@ -116,7 +116,7 @@ void chunk::_replace_bbox(const bbox& x0, const bbox& x1, bool b0, bool b1) CORRADE_ASSUME(false); } -bool chunk::can_place_entity(const entity_proto& proto, local_coords pos) +bool chunk::can_place_object(const object_proto& proto, local_coords pos) { (void)ensure_scenery_mesh(); |