mod operator is so stupid in pascal
authorunc0rr
Fri, 20 Jul 2012 09:09:17 +0400
changeset 7402 d5a710b3a2d7
parent 7401 4c3ec3dca0c7
child 7403 e8d0b21efa82
mod operator is so stupid in pascal
hedgewars/uGearsHandlers.pas
--- a/hedgewars/uGearsHandlers.pas	Thu Jul 19 20:34:21 2012 -0400
+++ b/hedgewars/uGearsHandlers.pas	Fri Jul 20 09:09:17 2012 +0400
@@ -40,7 +40,7 @@
 
 procedure NextAngle(Gear: PGear; dA: LongInt); inline;
 begin
-    Gear^.Angle := (LongInt(Gear^.Angle)     + dA) mod 4
+    Gear^.Angle := (LongInt(Gear^.Angle) + 4 + dA) mod 4
 end;
 
 procedure cakeStep(Gear: PGear);