hedgewars/GSHandlers.inc
changeset 5533 cf32b5928cbe
parent 5531 52f4a5d9a222
child 5562 8056d82b4d23
--- a/hedgewars/GSHandlers.inc	Tue Aug 09 21:54:45 2011 -0400
+++ b/hedgewars/GSHandlers.inc	Wed Aug 10 11:45:02 2011 -0400
@@ -2952,11 +2952,14 @@
         begin
         for i:= 0 to High(hogs) do
             begin
-            //d:= Distance(Gear^.X - hogs[i]^.X, Gear^.Y - hogs[i]^.Y);
-            hogs[i]^.dX:= _0_25 * (Gear^.X - hogs[i]^.X) / _250;
-            //if Gear^.X < hogs[i]^.X then hogs[i]^.dX.isNegative:= true;
-            hogs[i]^.dY:= -_0_25;
-            hogs[i]^.Active:= true;
+            if hogs[i] <> CurrentHedgehog^.Gear then
+                begin
+                //d:= Distance(Gear^.X - hogs[i]^.X, Gear^.Y - hogs[i]^.Y);
+                hogs[i]^.dX:= _0_25 * (Gear^.X - hogs[i]^.X) / _250;
+                //if Gear^.X < hogs[i]^.X then hogs[i]^.dX.isNegative:= true;
+                hogs[i]^.dY:= -_0_25;
+                hogs[i]^.Active:= true;
+                end
             end;
         end ;
         AfterAttack;