# HG changeset patch # User nemo # Date 1320542694 14400 # Node ID f2942ea53e53d3acb80046255f99ee259a589a46 # Parent 0cd63375e80b9e6e67d9ea7c19ca949a02cab445 Include density in gear kick diff -r 0cd63375e80b -r f2942ea53e53 hedgewars/uGears.pas --- a/hedgewars/uGears.pas Sat Nov 05 21:01:21 2011 -0400 +++ b/hedgewars/uGears.pas Sat Nov 05 21:24:54 2011 -0400 @@ -1314,8 +1314,8 @@ if ((Mask and EXPLDoNotTouchAny) = 0) and (((Mask and EXPLDoNotTouchHH) = 0) or (Gear^.Kind <> gtHedgehog)) then begin DeleteCI(Gear); - Gear^.dX:= Gear^.dX + SignAs(_0_005 * dmg + cHHKick, Gear^.X - fX); - Gear^.dY:= Gear^.dY + SignAs(_0_005 * dmg + cHHKick, Gear^.Y - fY); + 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; Gear^.State:= (Gear^.State or gstMoving) and (not gstLoser); if not Gear^.Invulnerable then Gear^.State:= (Gear^.State or gstMoving) and (not gstWinner);