mirror of
https://github.com/glest/glest-source.git
synced 2025-09-01 20:12:40 +02:00
Changes from 2367 without formatting mess
This commit is contained in:
@@ -599,10 +599,9 @@ void UnitUpdater::unitBeingAttacked(std::pair<bool,Unit *> &result, const Unit *
|
|||||||
|
|
||||||
if(distToUnit < 0 || unit->getCenteredPos().dist(enemy->getCenteredPos()) < distToUnit) {
|
if(distToUnit < 0 || unit->getCenteredPos().dist(enemy->getCenteredPos()) < distToUnit) {
|
||||||
distToUnit = unit->getCenteredPos().dist(enemy->getCenteredPos());
|
distToUnit = unit->getCenteredPos().dist(enemy->getCenteredPos());
|
||||||
result.first = true;
|
if(ast->getAttackRange() >= distToUnit){
|
||||||
result.second = enemy;
|
result.first= true;
|
||||||
if( ast->getAttackRange()>=distToUnit)
|
result.second= enemy;
|
||||||
{
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user