hedgewars/uGearsHandlers.pas
changeset 14303 6015b74eea55
parent 13614 c9642782778b
child 15929 128ace913837
--- a/hedgewars/uGearsHandlers.pas	Fri Nov 23 21:22:26 2018 +0100
+++ b/hedgewars/uGearsHandlers.pas	Fri Nov 23 15:54:23 2018 -0500
@@ -97,7 +97,7 @@
 
     // Handle world wrap and bounce edge manually
     if (WorldEdge = weWrap) and
-        ((hwRound(Gear^.X) < LongInt(leftX)) or (hwRound(Gear^.X) > LongInt(rightX))) then
+        ((hwRound(Gear^.X) < leftX) or (hwRound(Gear^.X) > rightX)) then
         begin
         LeftImpactTimer:= 150;
         RightImpactTimer:= 150;
@@ -105,9 +105,9 @@
         Gear^.Karma:= 1;
         end
     else if (WorldEdge = weBounce) and
-        (((hwRound(Gear^.X) - Gear^.Radius) < LongInt(leftX)) or ((hwRound(Gear^.X) + Gear^.Radius) > LongInt(rightX))) then
+        (((hwRound(Gear^.X) - Gear^.Radius) < leftX) or ((hwRound(Gear^.X) + Gear^.Radius) > rightX)) then
         begin
-        if (hwRound(Gear^.X) - Gear^.Radius < LongInt(leftX)) then
+        if (hwRound(Gear^.X) - Gear^.Radius < leftX) then
             LeftImpactTimer:= 333
         else
             RightImpactTimer:= 333;