From 6b7dac777cf7e0bb5d8546bdb51dcd6f04deca0b Mon Sep 17 00:00:00 2001 From: Fedja Beader Date: Tue, 25 Mar 2025 00:39:23 +0100 Subject: 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? --- src/actormanager.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src') 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(*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; -- cgit v1.2.3-70-g09d2