oh yeah, dY...
authornemo
Wed, 14 Mar 2012 23:58:56 -0400
changeset 6786 f631b8350b53
parent 6785 a8aa5984185f
child 6787 8a4cd042d191
oh yeah, dY...
hedgewars/GSHandlers.inc
--- a/hedgewars/GSHandlers.inc	Wed Mar 14 21:12:04 2012 -0400
+++ b/hedgewars/GSHandlers.inc	Wed Mar 14 23:58:56 2012 -0400
@@ -4284,7 +4284,10 @@
     
             resetdy:=hwAbs(iterator^.dX*4);
             resetdy:= resetdy + hwPow(resetdy,3)/_6 + _3 * hwPow(resetdy,5) / _40 + _5 * hwPow(resetdy,7) / resety + resetx * hwPow(resetdy,9) / resetdx;
-            iterator^.Angle:= hwRound(resetdy*_2048 / _PI)
+            iterator^.Angle:= hwRound(resetdy*_2048 / _PI);
+            if not iterator^.dY.isNegative then iterator^.Angle:= 2048-iterator^.Angle;
+            if iterator^.dX.isNegative then iterator^.Angle:= 4096-iterator^.Angle;
+            
             end;
 
         if (CurrentHedgehog <> nil) and (CurrentHedgehog^.Gear <> nil)