hedgewars/uGearsUtils.pas
changeset 10494 0eb97cf4c78e
parent 10419 e19a864e2fab
child 10506 325f7bb60580
--- a/hedgewars/uGearsUtils.pas	Wed Nov 12 22:47:43 2014 +0900
+++ b/hedgewars/uGearsUtils.pas	Fri Nov 14 17:00:47 2014 +0300
@@ -523,7 +523,7 @@
     if WorldEdge = weSea then
         begin
         tmp:= dist2Water;
-        dist2Water:= min(dist2Water, min(X - Gear^.Radius - leftX, rightX - (X + Gear^.Radius)));
+        dist2Water:= min(dist2Water, min(X - Gear^.Radius - LongInt(leftX), LongInt(rightX) - (X + Gear^.Radius)));
         // if water on sides is closer than on bottom -> horizontal direction
         isDirH:= tmp <> dist2Water;
         end;