- Fix hedgehog moveing direction after being shot by shotgun
authorunc0rr
Sat, 12 Apr 2008 17:19:01 +0000
changeset 837 05e910ef2bf8
parent 836 150c7c87e66c
child 838 1faae19f2116
- Fix hedgehog moveing direction after being shot by shotgun - Fix bad statistics info related to shotgun
hedgewars/uGears.pas
--- 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;