hedgewars/uWorld.pas
changeset 10562 3388822b3914
parent 10533 57b4d411f77d
child 10627 07ff179b0d97
--- a/hedgewars/uWorld.pas	Sat Nov 29 01:19:29 2014 +0100
+++ b/hedgewars/uWorld.pas	Sat Nov 29 03:13:06 2014 +0100
@@ -1872,12 +1872,12 @@
         end
     else
         begin
-        if abs(prevPoint.X - WorldDx - hwRound(FollowGear^.X)) > rightX - leftX - 100 then
+        if abs(prevPoint.X - WorldDx - hwRound(FollowGear^.X)) > LongInt(rightX) - leftX - 100 then
             begin
-            if (prevPoint.X - WorldDx) * 2 < LongInt(rightX + leftX) then
-                cameraJump:= rightX - leftX
+            if (prevPoint.X - WorldDx) * 2 < LongInt((rightX + leftX)) then
+                cameraJump:= LongInt(rightX) - leftX
                 else
-                cameraJump:= leftX - rightX;
+                cameraJump:= LongInt(leftX) - rightX;
             WorldDx:= WorldDx - cameraJump;
             end;