diff -r 7ee319134713 -r bc7b1d228a2c hedgewars/uGearsHandlers.pas --- 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