hedgewars/uGears.pas
changeset 6530 dc6ce7eb556b
parent 6515 74a04089bb56
child 6531 c938a35588af
--- a/hedgewars/uGears.pas	Mon Dec 12 19:23:05 2011 +0100
+++ b/hedgewars/uGears.pas	Thu Dec 15 11:06:36 2011 -0500
@@ -729,16 +729,8 @@
                             if ((Mask and EXPLDoNotTouchAny) = 0) and (((Mask and EXPLDoNotTouchHH) = 0) or (Gear^.Kind <> gtHedgehog)) then
                                 begin
                                 DeleteCI(Gear);
-                                if Gear^.Kind <> gtHedgehog then
-                                    begin
-                                    Gear^.dX:= Gear^.dX + SignAs(_0_005 * dmg + cHHKick, Gear^.X - fX)/Gear^.Density;
-                                    Gear^.dY:= Gear^.dY + SignAs(_0_005 * dmg + cHHKick, Gear^.Y - fY)/Gear^.Density;
-                                    end
-                                else
-                                    begin
-                                    Gear^.dX:= Gear^.dX + SignAs(_0_005 * dmg + cHHKick, Gear^.X - fX);
-                                    Gear^.dY:= Gear^.dY + SignAs(_0_005 * dmg + cHHKick, Gear^.Y - fY);
-                                    end;
+                                Gear^.dX:= Gear^.dX + SignAs(_0_005 * dmg + cHHKick, Gear^.X - fX)/(Gear^.Density/_3);
+                                Gear^.dY:= Gear^.dY + SignAs(_0_005 * dmg + cHHKick, Gear^.Y - fY)/(Gear^.Density/_3);
 
                                 Gear^.State:= (Gear^.State or gstMoving) and (not gstLoser);
                                 if not Gear^.Invulnerable then
@@ -909,8 +901,8 @@
                         end
                     else
                         begin
-                        Gear^.dX:= Ammo^.dX * Power * _0_01;
-                        Gear^.dY:= Ammo^.dY * Power * _0_01
+                        Gear^.dX:= (Ammo^.dX * Power * _0_01)/(Gear^.Density/_3);
+                        Gear^.dY:= (Ammo^.dY * Power * _0_01)/(Gear^.Density/_3);
                         end;
 
                     Gear^.Active:= true;