From d7ea52c8c86e607dc3e7557c96d07910d21be1f4 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 16 Mar 2023 11:12:31 +0100 Subject: a --- src/world.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/world.cpp') 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& 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 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; } -- cgit v1.2.3