removed unnecessary alarm checks

This commit is contained in:
Titus Tscharntke 2010-12-24 10:03:17 +00:00
parent 03eaa2c033
commit a3e0ae890b
1 changed files with 4 additions and 1 deletions

View File

@ -191,7 +191,10 @@ void UnitUpdater::updateUnitCommand(Unit *unit) {
if(unit->isOperative() && (!(cc==ccStop || cc==ccAttack)) )
{//stop and attack already check for themselves
Unit *sighted;
attackerOnSight(unit, &sighted);
if(unit->getTeam()==world->getThisTeamIndex()){
// check only needed for alarm sound, so its enough to check teammates units
attackerOnSight(unit, &sighted);
}
}
unit->getCurrCommand()->getCommandType()->update(this, unit);
}