It turns out, that tower is not over powered in code battle mode. It never hits flying enemy robot.
dev-time-step
KarolTrzeszczkowski 2016-04-03 12:45:50 +02:00 committed by krzys-h
parent c0780f938e
commit 1960b373f1
1 changed files with 5 additions and 1 deletions

View File

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