hedgewars/uGears.pas
changeset 837 05e910ef2bf8
parent 834 5687fa57a6c1
child 840 3c0028245ff3
--- a/hedgewars/uGears.pas	Sat Apr 12 17:00:06 2008 +0000
+++ b/hedgewars/uGears.pas	Sat Apr 12 17:19:01 2008 +0000
@@ -837,10 +837,10 @@
                        if t^.Kind = gtHedgehog then
                           begin
                           AddDamageTag(hwRound(Gear^.X), hwRound(Gear^.Y), dmg, t);
-                          uStats.HedgehogDamaged(Gear, dmg)
+                          uStats.HedgehogDamaged(t, dmg)
                           end;
                        DeleteCI(t);
-                       t^.dX:= t^.dX + SignAs(Gear^.dX * dmg * _0_01 + cHHKick, t^.X - Gear^.X);
+                       t^.dX:= t^.dX + hwAbs(Gear^.dX * dmg * _0_01) + SignAs(cHHKick, Gear^.dX);
                        t^.dY:= t^.dY + Gear^.dY * dmg * _0_01;
                        t^.State:= t^.State or gstMoving;
                        t^.Active:= true;