Fixed shooters detecting all objects as friendly, closes #581
parent
d4b431adaa
commit
8b7bd663b9
|
@ -148,57 +148,9 @@ 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;
|
||||
|
||||
ObjectType type = target->GetType();
|
||||
if ( type == OBJECT_DERRICK ||
|
||||
type == OBJECT_FACTORY ||
|
||||
type == OBJECT_REPAIR ||
|
||||
type == OBJECT_DESTROYER ||
|
||||
type == OBJECT_STATION ||
|
||||
type == OBJECT_CONVERT ||
|
||||
type == OBJECT_TOWER ||
|
||||
type == OBJECT_RESEARCH ||
|
||||
type == OBJECT_RADAR ||
|
||||
type == OBJECT_INFO ||
|
||||
type == OBJECT_ENERGY ||
|
||||
type == OBJECT_LABO ||
|
||||
type == OBJECT_NUCLEAR ||
|
||||
type == OBJECT_PARA ||
|
||||
type == OBJECT_SAFE ||
|
||||
type == OBJECT_HUSTON ||
|
||||
type == OBJECT_HUMAN ||
|
||||
type == OBJECT_TECH ||
|
||||
type == OBJECT_TOTO ||
|
||||
type == OBJECT_MOBILEfa ||
|
||||
type == OBJECT_MOBILEta ||
|
||||
type == OBJECT_MOBILEwa ||
|
||||
type == OBJECT_MOBILEia ||
|
||||
type == OBJECT_MOBILEfc ||
|
||||
type == OBJECT_MOBILEtc ||
|
||||
type == OBJECT_MOBILEwc ||
|
||||
type == OBJECT_MOBILEic ||
|
||||
type == OBJECT_MOBILEfi ||
|
||||
type == OBJECT_MOBILEti ||
|
||||
type == OBJECT_MOBILEwi ||
|
||||
type == OBJECT_MOBILEii ||
|
||||
type == OBJECT_MOBILEfs ||
|
||||
type == OBJECT_MOBILEts ||
|
||||
type == OBJECT_MOBILEws ||
|
||||
type == OBJECT_MOBILEis ||
|
||||
type == OBJECT_MOBILErt ||
|
||||
type == OBJECT_MOBILErc ||
|
||||
type == OBJECT_MOBILErr ||
|
||||
type == OBJECT_MOBILErs ||
|
||||
type == OBJECT_MOBILEsa ||
|
||||
type == OBJECT_MOBILEft ||
|
||||
type == OBJECT_MOBILEtt ||
|
||||
type == OBJECT_MOBILEwt ||
|
||||
type == OBJECT_MOBILEit ||
|
||||
type == OBJECT_MOBILEdr )
|
||||
{
|
||||
target = obj;
|
||||
}
|
||||
if ( !target->Implements(ObjectInterfaceType::Controllable) ) continue;
|
||||
if ( dynamic_cast<CControllableObject*>(target)->GetSelect() ) continue;
|
||||
if ( !dynamic_cast<CControllableObject*>(target)->GetSelectable() ) continue;
|
||||
|
||||
if (!target->Implements(ObjectInterfaceType::Old)) continue; // TODO: To be removed after COldObjectInterface is gone
|
||||
|
||||
|
|
Loading…
Reference in New Issue