diff options
author | Fedja Beader <fedja@protonmail.ch> | 2025-04-01 01:03:52 +0200 |
---|---|---|
committer | Fedja Beader <fedja@protonmail.ch> | 2025-04-01 01:04:05 +0200 |
commit | 6d603a800498a8e8699b80883be20df7366a95be (patch) | |
tree | 9197a7afd5a7073e666dfd07a3c18d5e3d526057 | |
parent | ca510bb8786941b2445830e3448a7c6d64910323 (diff) | |
download | manaplus-6d603a800498a8e8699b80883be20df7366a95be.tar.gz manaplus-6d603a800498a8e8699b80883be20df7366a95be.tar.bz2 manaplus-6d603a800498a8e8699b80883be20df7366a95be.tar.xz manaplus-6d603a800498a8e8699b80883be20df7366a95be.zip |
addendum documentation for validateBeing
-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, |