diff options
-rw-r--r-- | src/actormanager.cpp | 2 | ||||
-rw-r--r-- | src/actormanager.h | 10 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/actormanager.cpp b/src/actormanager.cpp index c5d1bd1a7..b24b40bad 100644 --- a/src/actormanager.cpp +++ b/src/actormanager.cpp @@ -1409,11 +1409,9 @@ bool ActorManager::validateBeing(const Being *const aroundBeing, if (being == nullptr) return false; - // Exclude the being we're checking around of. if (being == aroundBeing) return false; - // and the one that is specifically excluded. if (being == excluded) return false; diff --git a/src/actormanager.h b/src/actormanager.h index 43b9341b9..b912252a9 100644 --- a/src/actormanager.h +++ b/src/actormanager.h @@ -393,6 +393,16 @@ class ActorManager final : public ConfigListener #ifndef UNITTESTS protected: #endif // UNITTESTS + /* + * General checks if a being is valid for selection. + * Additionally, localPlayer is checked to exist + * + * @param aroundBeing being must not equal this one + * @param being being under scrutiny. Nullptr check performed + * @param type pass ActorType::Unknown if no matching desired + * @param exluded being must not equal this one + * @param maxCost allowed max pathfinder distance, if applicable + */ bool validateBeing(const Being *const aroundBeing, Being *const being, const ActorTypeT &type, |