diff --git a/source/glest_game/world/unit_updater.cpp b/source/glest_game/world/unit_updater.cpp index 42d96941..46cf8326 100644 --- a/source/glest_game/world/unit_updater.cpp +++ b/source/glest_game/world/unit_updater.cpp @@ -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); }