hedgewars/HHHandlers.inc
changeset 5991 c3b7064d9226
parent 5977 0b1bfdd95310
child 5995 647d52370ce9
child 6011 519f8a58c021
--- a/hedgewars/HHHandlers.inc	Thu Sep 22 14:02:44 2011 +0200
+++ b/hedgewars/HHHandlers.inc	Thu Sep 22 17:19:39 2011 +0400
@@ -1039,7 +1039,7 @@
         PrvInactive:= false;
         AllInactive:= false;
 
-        if not Gear^.Hedgehog^.Team^.hasGone then
+        if (Gear^.State and gstHHGone) = 0 then
             begin
             Gear^.Hedgehog^.Effects[hePoisoned] := false;
             if Gear^.Hedgehog^.Effects[heResurrectable] then begin
@@ -1054,21 +1054,9 @@
             end
         else
             begin
-            Gear^.State:= (Gear^.State or gstHHGone) and not gstAnimation;
+            Gear^.State:= Gear^.State and not gstAnimation;
             Gear^.doStep:= @doStepHedgehogGone;
 
-            with Gear^.Hedgehog^.Team^ do
-                for i:= 0 to cMaxHHIndex do
-                    if Hedgehogs[i].GearHidden <> nil then
-                        begin
-                        RestoreHog(@Hedgehogs[i]);
-                        if Hedgehogs[i].Gear <> nil then 
-                            begin
-                            Hedgehogs[i].Gear^.State:= Gear^.State or gstHHGone;
-                            Hedgehogs[i].Gear^.doStep:= @doStepHedgehogGone
-                            end
-                        end;
-
             // Gone message
             AddCaption(Format(GetEventString(eidGone), Gear^.Hedgehog^.Name), cWhiteColor, capgrpMessage);
             end