diff --git a/source/glest_game/world/unit_updater.cpp b/source/glest_game/world/unit_updater.cpp index da82bc814..92dcc95d5 100644 --- a/source/glest_game/world/unit_updater.cpp +++ b/source/glest_game/world/unit_updater.cpp @@ -1,7 +1,7 @@ // ============================================================== // This file is part of Glest (www.glest.org) // -// Copyright (C) 2001-2008 Martiño Figueroa +// Copyright (C) 2001-2008 Marti�o Figueroa // // You can redistribute this code and/or modify it under // the terms of the GNU General Public License as published @@ -637,7 +637,11 @@ void UnitUpdater::hit(Unit *attacker, const AttackSkillType* ast, const Vec2i &t while(pci.next()){ Unit *attacked= map->getCell(pci.getPos())->getUnit(targetField); if(attacked!=NULL){ - damage(attacker, ast, attacked, pci.getPos().dist(attacker->getTargetPos())); + if(ast->getSplashDamageAll() + || !attacker->isAlly(attacked) + || ( targetPos.x==pci.getPos().x && targetPos.y==pci.getPos().y )){ + damage(attacker, ast, attacked, pci.getPos().dist(attacker->getTargetPos())); + } } } }