hedgewars/uGears.pas
changeset 539 6a9bf1852bbc
parent 538 74219eadab5e
child 540 b06c5aace2fa
--- a/hedgewars/uGears.pas	Wed Jun 06 21:27:12 2007 +0000
+++ b/hedgewars/uGears.pas	Thu Jun 07 18:09:54 2007 +0000
@@ -450,12 +450,21 @@
      if (Gear^.State{ and not gstAnimation}) = 0 then
         begin
         t:= hwRound(Gear^.Y) - cHHRadius - 10 + WorldDy;
-        dec(t, HealthTag^.h + 2);
-        DrawCentered(hwRound(Gear^.X) + WorldDx, t, HealthTag, Surface);
-        dec(t, NameTag^.h + 2);
-        DrawCentered(hwRound(Gear^.X) + WorldDx, t, NameTag, Surface);
-        dec(t, Team^.NameTag^.h + 2);
-        DrawCentered(hwRound(Gear^.X) + WorldDx, t, Team^.NameTag, Surface)
+        if (cTagsMask and 1) <> 0 then
+           begin
+           dec(t, HealthTag^.h + 2);
+           DrawCentered(hwRound(Gear^.X) + WorldDx, t, HealthTag, Surface)
+           end;
+        if (cTagsMask and 2) <> 0 then
+           begin
+           dec(t, NameTag^.h + 2);
+           DrawCentered(hwRound(Gear^.X) + WorldDx, t, NameTag, Surface)
+           end;
+        if (cTagsMask and 4) <> 0 then
+           begin
+           dec(t, Team^.NameTag^.h + 2);
+           DrawCentered(hwRound(Gear^.X) + WorldDx, t, Team^.NameTag, Surface)
+           end
         end else // Current hedgehog
       if (Gear^.State and gstHHDriven) <> 0 then
         begin