# HG changeset patch
# User unc0rr
# Date 1289588155 -10800
# Node ID 37c2d0d3a039dd5f51df7ad01891085fa5bfcbbd
# Parent  c383deebd51c8fd594c22cf7d65ba2de76bd9f46# Parent  039b080128876042525ce0396534cb5d2d42ccba
merge

diff -r c383deebd51c -r 37c2d0d3a039 hedgewars/GSHandlers.inc
--- a/hedgewars/GSHandlers.inc	Fri Nov 12 21:55:33 2010 +0300
+++ b/hedgewars/GSHandlers.inc	Fri Nov 12 21:55:55 2010 +0300
@@ -4244,12 +4244,13 @@
 
     if ((Gear^.Message and gmAttack) <> 0) and (hh^.Gear^.Health > 0) and (TurnTimeLeft > 0) then 
         begin
-        i := getRandom(Length(graves));
+        if Length(graves) > Gear^.Tag then Gear^.Tag:= 0;
         dec(hh^.Gear^.Health);
         if (hh^.Gear^.Health = 0) and (hh^.Gear^.Damage = 0) then
             hh^.Gear^.Damage:= 1;
         RenderHealth(hh^);
-        inc(graves[i]^.Health);
+        inc(graves[Gear^.Tag]^.Health);
+        inc(Gear^.Tag)
 {-for i:= 0 to High(graves) do begin
             if hh^.Gear^.Health > 0 then begin
                 dec(hh^.Gear^.Health);
diff -r c383deebd51c -r 37c2d0d3a039 hedgewars/uGears.pas
--- a/hedgewars/uGears.pas	Fri Nov 12 21:55:33 2010 +0300
+++ b/hedgewars/uGears.pas	Fri Nov 12 21:55:55 2010 +0300
@@ -540,6 +540,7 @@
                 end;
  gtResurrector: begin
                 gear^.Radius := 100;
+                gear^.Tag := 0
                 end;
      gtWaterUp: begin
                 gear^.Tag := 47;