hedgewars/GSHandlers.inc
changeset 7393 3f203c62353b
parent 7391 588eabb4b384
child 7394 789d7831ec53
--- a/hedgewars/GSHandlers.inc	Sun Jul 15 15:35:28 2012 -0400
+++ b/hedgewars/GSHandlers.inc	Sun Jul 15 16:56:05 2012 -0400
@@ -733,6 +733,11 @@
 ////////////////////////////////////////////////////////////////////////////////
 procedure doStepGrave(Gear: PGear);
 begin
+    if Gear^.Timer = 0 then
+        begin
+        DeleteGear(Gear);
+        exit
+        end;
     AllInactive := false;
     if Gear^.dY.isNegative then
         if TestCollisionY(Gear, -1) then
@@ -5090,7 +5095,7 @@
                 resgear^.Hedgehog := graves.ar^[i]^.Hedgehog;
                 resgear^.Health := graves.ar^[i]^.Health;
                 PHedgehog(graves.ar^[i]^.Hedgehog)^.Gear := resgear;
-                DeleteGear(graves.ar^[i]);
+                graves.ar^[i]^.Timer:= 0;
                 RenderHealth(resgear^.Hedgehog^);
                 RecountTeamHealth(resgear^.Hedgehog^.Team);
                 resgear^.Hedgehog^.Effects[heResurrected]:= 1;