issue #445 spin math
authornemo
Fri, 26 Oct 2012 12:42:56 -0400
changeset 7825 1b96361a7ef4
parent 7824 3df73ec7fcf2
child 7826 9f529722d61e
issue #445 spin math
hedgewars/uGearsUtils.pas
--- a/hedgewars/uGearsUtils.pas	Fri Oct 26 17:21:28 2012 +0200
+++ b/hedgewars/uGearsUtils.pas	Fri Oct 26 12:42:56 2012 -0400
@@ -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