2 extra steps was still occasionally causing problems w/ edge cases. hopefully 3 should do the trick
authornemo
Thu, 15 Sep 2011 22:53:47 -0400
changeset 5926 09bbc7b88714
parent 5925 2a9353b800cd
child 5927 45aa6b97b24d
2 extra steps was still occasionally causing problems w/ edge cases. hopefully 3 should do the trick
hedgewars/GSHandlers.inc
--- a/hedgewars/GSHandlers.inc	Thu Sep 15 22:33:55 2011 -0400
+++ b/hedgewars/GSHandlers.inc	Thu Sep 15 22:53:47 2011 -0400
@@ -1115,9 +1115,9 @@
 procedure doStepDEagleShot(Gear: PGear);
 begin
     PlaySound(sndGun);
-    // add 2 initial steps to avoid problem with ammoshove related to calculation of radius + 1 radius as gear widths
-    Gear^.X := Gear^.X + Gear^.dX * 2;
-    Gear^.Y := Gear^.Y + Gear^.dY * 2;
+    // add 3 initial steps to avoid problem with ammoshove related to calculation of radius + 1 radius as gear widths, and also just plain old weird angles
+    Gear^.X := Gear^.X + Gear^.dX * 3;
+    Gear^.Y := Gear^.Y + Gear^.dY * 3;
     Gear^.doStep := @doStepBulletWork
 end;
 
@@ -1151,9 +1151,9 @@
         Gear^.dX := SignAs(AngleSin(HHGear^.Angle), HHGear^.dX) * _0_5;
         Gear^.dY := -AngleCos(HHGear^.Angle) * _0_5;
         PlaySound(sndGun);
-        // add an initial step to avoid problem with ammoshove related to calculation of radius + 1 radius as gear widths
-        Gear^.X := Gear^.X + Gear^.dX;  
-        Gear^.Y := Gear^.Y + Gear^.dY;
+        // add 3 initial steps to avoid problem with ammoshove related to calculation of radius + 1 radius as gear widths, and also just weird angles
+        Gear^.X := Gear^.X + Gear^.dX * 3;  
+        Gear^.Y := Gear^.Y + Gear^.dY * 3;
         Gear^.doStep := @doStepBulletWork;
     end
     else