summaryrefslogtreecommitdiffhomepage
path: root/src/world.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-03-16 11:12:31 +0100
committerStanislaw Halik <sthalik@misaki.pl>2023-03-17 23:23:11 +0100
commitd7ea52c8c86e607dc3e7557c96d07910d21be1f4 (patch)
treea4aaefc66c6af7cabf2d454a0c5262cbdd7cc819 /src/world.cpp
parentc699da23c93ce840da2f87749efe0a69c3c37335 (diff)
a
Diffstat (limited to 'src/world.cpp')
-rw-r--r--src/world.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/world.cpp b/src/world.cpp
index a4035e14..b1f2e434 100644
--- a/src/world.cpp
+++ b/src/world.cpp
@@ -112,12 +112,12 @@ std::uint64_t world::entity_counter = min_id;
void world::do_make_entity(const std::shared_ptr<entity>& e, global_coords pos)
{
fm_debug_assert(e->id > min_id);
- fm_debug_assert(e->c.world()._unique_id == _unique_id);
+ fm_debug_assert(e->c->world()._unique_id == _unique_id);
fm_assert(Vector2ui(e->bbox_size).product() > 0);
fm_assert(e->type != entity_type::none);
e->coord = pos;
_entities[e->id] = e;
- e->c.add_entity(e);
+ e->c->add_entity(e);
}
void world::do_kill_entity(std::uint64_t id)
@@ -131,7 +131,7 @@ std::shared_ptr<entity> world::find_entity_(std::uint64_t id)
{
auto it = _entities.find(id);
auto ret = it == _entities.end() ? nullptr : it->second.lock();
- fm_debug_assert(&ret->c.world() == this);
+ fm_debug_assert(!ret || &ret->c->world() == this);
return ret;
}