diff -r a9f18c66ce34 -r 2f2f78fc65a3 hedgewars/uGearsHandlers.pas --- 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