hedgewars/uGearsUtils.pas
branch0.9.18
changeset 7884 60132c558c05
parent 7825 1b96361a7ef4
child 8003 7d8bce524daf
--- a/hedgewars/uGearsUtils.pas	Fri Oct 26 14:13:09 2012 +0100
+++ b/hedgewars/uGearsUtils.pas	Mon Oct 29 21:46:50 2012 +0100
@@ -323,8 +323,9 @@
 var 
     dAngle: real;
 begin
-// Frac/Round to be kind to JS as of 2012-08-27 where there is yet no int64/uint64
-    dAngle := (Gear^.dX.Round + Gear^.dY.Round) / 2 + (Gear^.dX.Frac+Gear^.dY.Frac) / $80000000;
+    // Frac/Round to be kind to JS as of 2012-08-27 where there is yet no int64/uint64
+    //dAngle := (Gear^.dX.QWordValue + Gear^.dY.QWordValue) / $80000000;
+    dAngle := (Gear^.dX.Round + Gear^.dY.Round) / 2 + (Gear^.dX.Frac/$100000000+Gear^.dY.Frac/$100000000);
     if not Gear^.dX.isNegative then
         Gear^.DirAngle := Gear^.DirAngle + dAngle
     else