hedgewars/uGearsHandlers.pas
changeset 7416 2f2f78fc65a3
parent 7405 63f56edae4c6
child 7671 43f38923bc6e
--- a/hedgewars/uGearsHandlers.pas	Fri Jul 20 21:30:53 2012 -0400
+++ b/hedgewars/uGearsHandlers.pas	Sun Jul 22 00:48:48 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