draw health tag relative to screen if State <> 0
authornemo
Sun, 14 Aug 2011 21:49:04 -0400
changeset 5566 9ffa2e2ec550
parent 5565 1a326ba319c9
child 5567 44c9a577b082
draw health tag relative to screen if State <> 0
hedgewars/uVisualGears.pas
--- a/hedgewars/uVisualGears.pas	Mon Aug 15 00:23:32 2011 +0200
+++ b/hedgewars/uVisualGears.pas	Sun Aug 14 21:49:04 2011 -0400
@@ -477,7 +477,13 @@
                                  DrawCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex);
                              end;
             vgtSmallDamageTag: DrawCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex);
-            vgtHealthTag: if Gear^.Tex <> nil then DrawCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex);
+            vgtHealthTag: if Gear^.Tex <> nil then 
+                            begin
+                            if Gear^.State = 0 then 
+                                DrawCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex)
+                            else DrawTexture(round(Gear^.X), round(Gear^.Y), Gear^.Tex); 
+                            end;
+//if Gear^.Tex <> nil then DrawCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex);
             vgtStraightShot: DrawRotatedF(TSprite(Gear^.State), round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame, 1, Gear^.Angle);
         end;
         if (cReducedQuality and rqAntiBoom) = 0 then