hedgewars/uGears.pas
changeset 3459 c552aa44108d
parent 3453 d65657c94bb9
child 3460 d957d5f7b58d
--- a/hedgewars/uGears.pas	Mon May 10 17:48:06 2010 +0000
+++ b/hedgewars/uGears.pas	Tue May 11 13:59:57 2010 +0000
@@ -194,7 +194,7 @@
         ptmp:= tmp;
         tmp:= tmp^.NextGear
         end;
-
+    
     if ptmp <> tmp then
         begin
         Gear^.NextGear:= ptmp^.NextGear;
@@ -222,12 +222,9 @@
 procedure spawnHealthTagForHH(HHGear: PGear; dmg: Longword);
 var tag: PVisualGear;
 begin
-tag:= AddVisualGear(hwRound(HHGear^.X), hwRound(HHGear^.Y), vgtHealthTag, dmg);if (tag <> nil) then
-    begin
+tag:= AddVisualGear(hwRound(HHGear^.X), hwRound(HHGear^.Y), vgtHealthTag, dmg);
+if (tag <> nil) then
     tag^.Hedgehog:= PHedgehog(HHGear^.Hedgehog); // the tag needs the tag to determine the text color
-    tag^.doStep(tag,1); // do this now because the Gear could already be deleted on next step call
-    tag^.Hedgehog:= nil
-    end;
 AllInactive:= false;
 HHGear^.Active:= true;
 end;