diff options
Diffstat (limited to 'src/actormanager.cpp')
-rw-r--r-- | src/actormanager.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/actormanager.cpp b/src/actormanager.cpp index 7da8249b0..bee73cd05 100644 --- a/src/actormanager.cpp +++ b/src/actormanager.cpp @@ -405,6 +405,21 @@ Being *ActorManager::findBeing(const BeingId id) const return nullptr; } +ActorSprite *ActorManager::findActor(const BeingId id) const +{ + const ActorSpritesMapConstIterator it = mActorsIdMap.find(id); + if (it != mActorsIdMap.end()) + { + ActorSprite *const actor = (*it).second; + if (actor && + actor->getId() == id) + { + return actor; + } + } + return nullptr; +} + Being *ActorManager::findBeing(const int x, const int y, const ActorTypeT type) const { |