mirror of
https://github.com/glest/glest-source.git
synced 2025-09-25 07:01:39 +02:00
enemy targeting changed a bit again
This commit is contained in:
@@ -561,6 +561,10 @@ void UnitUpdater::unitBeingAttacked(std::pair<bool,Unit *> &result, const Unit *
|
|||||||
distToUnit = unit->getCenteredPos().dist(enemy->getCenteredPos());
|
distToUnit = unit->getCenteredPos().dist(enemy->getCenteredPos());
|
||||||
result.first = true;
|
result.first = true;
|
||||||
result.second = enemy;
|
result.second = enemy;
|
||||||
|
if( ast->getAttackRange()>=distToUnit)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user