Fix Shooter target getting stuck on not selectable objects (#900)

dev-buzzingcars
krzys-h 2017-01-28 12:56:42 +01:00
parent 7fadf7bad5
commit 9eae1e151d
1 changed files with 1 additions and 1 deletions

View File

@ -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