hedgewars/uGearsUtils.pas
changeset 7614 3ae60c8a15f2
parent 7603 e9c3c67b5dfd
child 7625 5c0ad64afc8d
--- a/hedgewars/uGearsUtils.pas	Mon Aug 27 11:05:09 2012 +0200
+++ b/hedgewars/uGearsUtils.pas	Mon Aug 27 16:52:50 2012 -0400
@@ -321,7 +321,8 @@
 var 
     dAngle: real;
 begin
-    dAngle := (Gear^.dX.QWordValue + Gear^.dY.QWordValue) / $80000000;
+// 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;
     if not Gear^.dX.isNegative then
         Gear^.DirAngle := Gear^.DirAngle + dAngle
     else