Solves #700
It turns out, that tower is not over powered in code battle mode. It never hits flying enemy robot.dev-time-step
parent
c0780f938e
commit
1960b373f1
|
@ -271,12 +271,16 @@ CObject* CAutoTower::SearchTarget(Math::Vector &impact)
|
|||
CObject* best = nullptr;
|
||||
for (CObject* obj : CObjectManager::GetInstancePointer()->GetAllObjects())
|
||||
{
|
||||
int oTeam=obj->GetTeam();
|
||||
int myTeam=m_object->GetTeam();
|
||||
ObjectType oType = obj->GetType();
|
||||
if ( oType != OBJECT_MOTHER &&
|
||||
oType != OBJECT_ANT &&
|
||||
oType != OBJECT_SPIDER &&
|
||||
oType != OBJECT_BEE &&
|
||||
oType != OBJECT_WORM ) continue;
|
||||
oType != OBJECT_WORM &&
|
||||
(oTeam == myTeam ||
|
||||
oTeam == 0) ) continue;
|
||||
|
||||
if ( !obj->GetDetectable() ) continue; // inactive?
|
||||
|
||||
|
|
Loading…
Reference in New Issue