add dx/dy increment prior to dostepbulletwork to avoid hurting yourself due to adjusted radius interaction (which snowball needs)
authornemo
Sun, 26 Dec 2010 16:56:33 -0500
changeset 4708 aa1da6339eb3
parent 4707 1d3b19eabfe7
child 4709 c224bfb5d41c
add dx/dy increment prior to dostepbulletwork to avoid hurting yourself due to adjusted radius interaction (which snowball needs)
hedgewars/GSHandlers.inc
--- a/hedgewars/GSHandlers.inc	Sun Dec 26 16:45:14 2010 -0500
+++ b/hedgewars/GSHandlers.inc	Sun Dec 26 16:56:33 2010 -0500
@@ -912,6 +912,9 @@
 procedure doStepDEagleShot(Gear: PGear);
 begin
     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;
     Gear^.doStep := @doStepBulletWork
 end;
 
@@ -945,6 +948,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;
         Gear^.doStep := @doStepBulletWork;
     end
     else