hedgewars/uGearsHandlersMess.pas
changeset 14084 a173557250a3
parent 14079 a3506c6a4cbe
child 14125 7bb0e27910aa
equal deleted inserted replaced
14083:bf40b5f938b0 14084:a173557250a3
  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(hwRound(tX)) + abs(hwRound(tY)) < Gear^.Angle * 9) and
  2107             (not ((tX.Round + tY.Round < 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