gfAISurvival/heResurrectable: respawn always with 100HP
authorburp
Thu, 26 Aug 2010 22:38:25 +0200
changeset 3775 c0397452e7c5
parent 3774 af0e68ca273e
child 3776 28849f5a03c9
gfAISurvival/heResurrectable: respawn always with 100HP
hedgewars/uGears.pas
--- a/hedgewars/uGears.pas	Thu Aug 26 16:02:09 2010 +0200
+++ b/hedgewars/uGears.pas	Thu Aug 26 22:38:25 2010 +0200
@@ -1545,10 +1545,12 @@
 
 procedure ResurrectHedgehog(gear: PGear);
 begin
-    gear^.Health := 100;
     gear^.dX := _0;
     gear^.dY := _0;
     gear^.State := gstWait;
+    uStats.HedgehogDamaged(gear);
+    gear^.Damage := 0;
+    gear^.Health := 100;
     with CurrentHedgehog^ do begin
         inc(Team^.stats.AIKills);
         if Team^.AIKillsTex <> nil then FreeTexture(Team^.AIKillsTex);