hedgewars/uScript.pas
changeset 14759 b39da9cf7616
parent 14755 ab7bf5036314
child 14932 9d6a25239d00
--- a/hedgewars/uScript.pas	Sun Apr 07 20:03:09 2019 +0200
+++ b/hedgewars/uScript.pas	Sun Apr 07 20:53:29 2019 +0200
@@ -1865,9 +1865,9 @@
                     gear^.Health:= 0;
                 RenderHealth(gear^.Hedgehog^);
                 RecountTeamHealth(gear^.Hedgehog^.Team)
-                end;
-            // Why did this do a "setalltoactive" ?
-            //SetAllToActive;
+                end
+            else if (gear^.RenderHealth) and (gear^.Tex <> nil) then
+                FreeAndNilTexture(gear^.Tex);
             Gear^.Active:= true;
             AllInactive:= false
             end