From 9eae1e151d3d68ee06396c430ddaf300634200ac Mon Sep 17 00:00:00 2001 From: krzys-h Date: Sat, 28 Jan 2017 12:56:42 +0100 Subject: [PATCH] Fix Shooter target getting stuck on not selectable objects (#900) --- src/ui/controls/target.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/controls/target.cpp b/src/ui/controls/target.cpp index c90c2051..dd18bd38 100644 --- a/src/ui/controls/target.cpp +++ b/src/ui/controls/target.cpp @@ -149,7 +149,7 @@ CObject* CTarget::DetectFriendObject(Math::Point pos) if ( !target->GetDetectable() ) continue; if ( target->GetProxyActivate() ) continue; if ( target->Implements(ObjectInterfaceType::Controllable) && dynamic_cast(target)->GetSelect() ) continue; - if ( target->Implements(ObjectInterfaceType::Controllable) && !dynamic_cast(target)->GetSelectable() ) continue; + if ( !target->Implements(ObjectInterfaceType::Controllable) || !dynamic_cast(target)->GetSelectable() ) continue; if (!target->Implements(ObjectInterfaceType::Old)) continue; // TODO: To be removed after COldObjectInterface is gone