From 730319ba20fa324ded2319e38be28e2a27f3fbbe Mon Sep 17 00:00:00 2001 From: krzys-h Date: Tue, 14 Jul 2015 21:39:51 +0200 Subject: [PATCH] Fixed Robby (OBJECT_TOTO) animations --- src/object/object_manager.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/object/object_manager.cpp b/src/object/object_manager.cpp index 21d9950f..c3353534 100644 --- a/src/object/object_manager.cpp +++ b/src/object/object_manager.cpp @@ -265,7 +265,6 @@ CObject* CObjectManager::Radar(CObject* pThis, Math::Vector thisPosition, float if ( pObj->GetProxyActivate() ) continue; oType = pObj->GetType(); - if ( oType == OBJECT_TOTO || oType == OBJECT_CONTROLLER ) continue; if (cbotTypes) { @@ -295,6 +294,10 @@ CObject* CObjectManager::Radar(CObject* pThis, Math::Vector thisPosition, float // END OF TODO } + if ( std::find(type.begin(), type.end(), oType) == type.end() && type.size() > 0 ) continue; + + if ( (oType == OBJECT_TOTO || oType == OBJECT_CONTROLLER) && type.size() == 0 ) continue; // allow OBJECT_TOTO and OBJECT_CONTROLLER only if explicitly asked in type parameter + if ( filter_flying == FILTER_ONLYLANDING ) { physics = pObj->GetPhysics(); @@ -318,8 +321,6 @@ CObject* CObjectManager::Radar(CObject* pThis, Math::Vector thisPosition, float if ( filter_enemy != 0 && (filter_enemy & enemy) == 0 ) continue; } - if ( std::find(type.begin(), type.end(), oType) == type.end() && type.size() > 0 ) continue; - oPos = pObj->GetPosition(); d = Math::DistanceProjected(iPos, oPos); if ( d < minDist || d > maxDist ) continue; // too close or too far?