diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-03-15 15:55:50 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-03-15 16:22:16 +0100 |
commit | 73abf154e82546256f4a860c666f1f652767bda9 (patch) | |
tree | 8dda30884e3c8da99f1ea7ebc9232890eeab8bcc /src/world.cpp | |
parent | 23eae734c5e8a49c02e48fe0b401d610abfee9c8 (diff) |
aa
Diffstat (limited to 'src/world.cpp')
-rw-r--r-- | src/world.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/world.cpp b/src/world.cpp index 37b78616..f5c378cd 100644 --- a/src/world.cpp +++ b/src/world.cpp @@ -105,4 +105,10 @@ void world::do_kill_entity(std::uint64_t id) fm_debug_assert(cnt > 0); } +std::shared_ptr<entity> world::find_entity(std::uint64_t id) +{ + auto it = _entities.find(id); + return it == _entities.end() ? nullptr : it->second.lock(); +} + } // namespace floormat |