diff options
author | Fedja Beader <fedja@protonmail.ch> | 2025-03-25 00:39:23 +0100 |
---|---|---|
committer | Fedja Beader <fedja@protonmail.ch> | 2025-04-06 01:44:21 +0200 |
commit | ac95cf4561b07279296e2c49c951ac55f163edbd (patch) | |
tree | 4fdd45e476b9b1a86fb30c7fdb4fab9789f1c548 | |
parent | 252f6f159bd96279a5111b328e5dca349e1832a1 (diff) | |
download | plus-ac95cf4561b07279296e2c49c951ac55f163edbd.tar.gz plus-ac95cf4561b07279296e2c49c951ac55f163edbd.tar.bz2 plus-ac95cf4561b07279296e2c49c951ac55f163edbd.tar.xz plus-ac95cf4561b07279296e2c49c951ac55f163edbd.zip |
findNearestLivingBeing: move (unknown) cheap check before set lookup
seems to skip beings with info if stopattack is active or if they are
marked as unselectable (like hammocks in ML)... huh?
**** mana/plus!145
-rw-r--r-- | src/actormanager.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/actormanager.cpp b/src/actormanager.cpp index 737a864a7..2b542fede 100644 --- a/src/actormanager.cpp +++ b/src/actormanager.cpp @@ -1305,6 +1305,12 @@ Being *ActorManager::findNearestLivingBeing(const Being *const aroundBeing, } Being *const being = static_cast<Being*>(*i); + if ((being->getInfo() != nullptr) + && !(being->getInfo()->isTargetSelection() || modActive)) + { + continue; + } + int priority = defaultPriorityIndex; if (filtered) { @@ -1331,12 +1337,6 @@ Being *ActorManager::findNearestLivingBeing(const Being *const aroundBeing, } } - if ((being->getInfo() != nullptr) - && !(being->getInfo()->isTargetSelection() || modActive)) - { - continue; - } - if (!validateBeing(aroundBeing, being, type, excluded, 50)) continue; |