ignore non-hedgies here. could be useful, but Hammer needs to be taught to consider it. (hammer + explosives on a bridge could be neat)
authornemo
Fri, 03 May 2013 21:38:16 -0400
changeset 8953 d0e5c1002fe1
parent 8952 a6ee1e7310fb
child 8954 1e8b390ab011
ignore non-hedgies here. could be useful, but Hammer needs to be taught to consider it. (hammer + explosives on a bridge could be neat)
hedgewars/uAIMisc.pas
--- a/hedgewars/uAIMisc.pas	Fri May 03 21:36:01 2013 -0400
+++ b/hedgewars/uAIMisc.pas	Fri May 03 21:38:16 2013 -0400
@@ -733,9 +733,8 @@
 
 for i:= 0 to Pred(Targets.Count) do
     with Targets.ar[i] do
-      if matters then
          // hammer hit radius is 8, shift is 10
-        if abs(Point.x - x) + abs(Point.y - y) < 18 then
+      if matters and (Kind = gtHedgehog) and (abs(Point.x - x) + abs(Point.y - y) < 18) then
             begin
             r:= trunc(sqrt(sqr(Point.x - x)+sqr(Point.y - y)));