hedgewars/uGearsHandlers.pas
changeset 7628 bc7b1d228a2c
parent 7416 2f2f78fc65a3
child 7671 43f38923bc6e
--- a/hedgewars/uGearsHandlers.pas	Thu Aug 30 12:47:41 2012 -0400
+++ b/hedgewars/uGearsHandlers.pas	Thu Aug 30 13:02:19 2012 -0400
@@ -52,8 +52,8 @@
     dA := hwSign(Gear^.dX);
     xx := dirs[Gear^.Angle].x;
     yy := dirs[Gear^.Angle].y;
-    xxn := dirs[(LongInt(Gear^.Angle) + 4 + dA) mod 4].x;
-    yyn := dirs[(LongInt(Gear^.Angle) + 4 + dA) mod 4].y;
+    xxn := dirs[(Gear^.Angle + dA) and 3].x;
+    yyn := dirs[(Gear^.Angle + dA) and 3].y;
 
     if (xx = 0) then
         if TestCollisionYwithGear(Gear, yy) <> 0 then