hedgewars/uGearsHandlersMess.pas
changeset 14095 a3506c6a4cbe
parent 14086 aa586aadd91f
child 14100 a173557250a3
equal deleted inserted replaced
14094:ff6e67066fd0 14095:a3506c6a4cbe
  2102         begin
  2102         begin
  2103         tX:=Gear^.X-targ^.X;
  2103         tX:=Gear^.X-targ^.X;
  2104         tY:=Gear^.Y-targ^.Y;
  2104         tY:=Gear^.Y-targ^.Y;
  2105         // allow escaping - should maybe flag this too
  2105         // allow escaping - should maybe flag this too
  2106         if (GameTicks > Gear^.FlightTime + 10000) or
  2106         if (GameTicks > Gear^.FlightTime + 10000) or
  2107             (not ((abs(tX.Round) + abs(tY.Round) < Gear^.Angle * 9) and
  2107             (not ((abs(hwRound(tX)) + abs(hwRound(tY)) < Gear^.Angle * 9) and
  2108                   (hwRound(hwSqr(tX) + hwSqr(tY)) < sqr(Gear^.Angle * 6))))
  2108                   (hwRound(hwSqr(tX) + hwSqr(tY)) < sqr(Gear^.Angle * 6))))
  2109              then
  2109              then
  2110             targ:= nil
  2110             targ:= nil
  2111         end;
  2111         end;
  2112 
  2112