Score AI resurrection as a kill. These values will not be the same as the in-game scoring, since in-game scoring doesn't count friendlies.
authornemo
Sun, 08 Jul 2012 10:03:31 -0400
changeset 7357 06454899d0d2
parent 7354 b79b545bd568
child 7360 d833d1010710
Score AI resurrection as a kill. These values will not be the same as the in-game scoring, since in-game scoring doesn't count friendlies.
hedgewars/uGearsUtils.pas
--- a/hedgewars/uGearsUtils.pas	Sat Jul 07 23:22:03 2012 +0200
+++ b/hedgewars/uGearsUtils.pas	Sun Jul 08 10:03:31 2012 -0400
@@ -446,6 +446,10 @@
     sparkles: PVisualGear;
     gX, gY: LongInt;
 begin
+    if (Gear^.LastDamage <> nil) then
+        uStats.HedgehogDamaged(Gear, Gear^.LastDamage, 0, true)
+    else
+        uStats.HedgehogDamaged(Gear, CurrentHedgehog, 0, true);
     AttackBar:= 0;
     gear^.dX := _0;
     gear^.dY := _0;