removed unnecessary alarm checks
This commit is contained in:
parent
03eaa2c033
commit
a3e0ae890b
|
@ -191,7 +191,10 @@ void UnitUpdater::updateUnitCommand(Unit *unit) {
|
||||||
if(unit->isOperative() && (!(cc==ccStop || cc==ccAttack)) )
|
if(unit->isOperative() && (!(cc==ccStop || cc==ccAttack)) )
|
||||||
{//stop and attack already check for themselves
|
{//stop and attack already check for themselves
|
||||||
Unit *sighted;
|
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);
|
unit->getCurrCommand()->getCommandType()->update(this, unit);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user