[colobot] 49/100: Fix Shooter target getting stuck on not selectable objects (#900)

Didier Raboud odyx at moszumanska.debian.org
Thu Jun 1 18:10:18 UTC 2017


This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 9eae1e151d3d68ee06396c430ddaf300634200ac
Author: krzys-h <krzys_h at interia.pl>
Date:   Sat Jan 28 12:56:42 2017 +0100

    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 c90c205..dd18bd3 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<CControllableObject*>(target)->GetSelect() )  continue;
-        if ( target->Implements(ObjectInterfaceType::Controllable) && !dynamic_cast<CControllableObject*>(target)->GetSelectable() )  continue;
+        if ( !target->Implements(ObjectInterfaceType::Controllable) || !dynamic_cast<CControllableObject*>(target)->GetSelectable() )  continue;
 
         if (!target->Implements(ObjectInterfaceType::Old)) continue; // TODO: To be removed after COldObjectInterface is gone
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/colobot.git



More information about the Pkg-games-commits mailing list