hedgewars/uAIMisc.pas
changeset 7385 4acb5c021cb9
parent 7378 ac9ce7f033df
child 7426 55b49cc1f33a
child 7430 9c132b368ddb
--- a/hedgewars/uAIMisc.pas	Thu Jul 12 23:31:06 2012 +0400
+++ b/hedgewars/uAIMisc.pas	Fri Jul 13 01:07:53 2012 +0400
@@ -197,7 +197,9 @@
                 if Gear^.Damage >= Gear^.Health then
                     AddBonus(hwRound(Gear^.X), hwRound(Gear^.Y), 60, -25)
                 else
-                    if isAfterAttack and (ThinkingHH^.Hedgehog <> Gear^.Hedgehog) then
+                    if isAfterAttack
+                      and (ThinkingHH^.Hedgehog <> Gear^.Hedgehog)
+                      and ((hwAbs(Gear^.dX) + hwAbs(Gear^.dY)) < _0_1) then
                         if (ClansCount > 2) or (MyClan = Gear^.Hedgehog^.Team^.Clan) then
                             AddBonus(hwRound(Gear^.X), hwRound(Gear^.Y), 150, -3) // hedgehog-friend
                         else