hedgewars/GSHandlers.inc
changeset 6787 8a4cd042d191
parent 6786 f631b8350b53
child 6792 f72c8b5d421c
--- a/hedgewars/GSHandlers.inc	Wed Mar 14 23:58:56 2012 -0400
+++ b/hedgewars/GSHandlers.inc	Sat Mar 17 13:16:50 2012 -0400
@@ -4272,6 +4272,7 @@
             end;
 
         // is it worth adding an arcsin table?  Just how often would we end up doing something like this?
+        // SYNCED ANGLE UPDATE
         if iterator^.Kind = gtRCPlane then
             begin
             // recycling as temp vars
@@ -4285,9 +4286,13 @@
             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);
-            if not iterator^.dY.isNegative then iterator^.Angle:= 2048-iterator^.Angle;
+            end
+        // VISUAL USE OF ANGLE ONLY
+        else if (CurAmmoGear <> nil) and (CurAmmoGear^.Kind = gtKamikaze) and (CurAmmoGear^.Hedgehog = iterator^.Hedgehog) then
+            begin
+            iterator^.Angle:= DxDy2AttackAngle(iterator^.dX, iterator^.dY);
+            iterator^.Angle:= 2048-iterator^.Angle;
             if iterator^.dX.isNegative then iterator^.Angle:= 4096-iterator^.Angle;
-            
             end;
 
         if (CurrentHedgehog <> nil) and (CurrentHedgehog^.Gear <> nil)