Change how the status setting works for shownames. Also, don't show armor by default...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 9 Jul 2011 11:15:19 +0000 (14:15 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 9 Jul 2011 11:15:19 +0000 (14:15 +0300)
data/defaultVT.cfg
data/qcsrc/client/shownames.qc

index 1c90611..4d2f97e 100644 (file)
@@ -1150,7 +1150,7 @@ seta hud_contents_stomach_color "0.3 0.2 0"
 \r
 seta hud_shownames 1 "draw names and health/armor of nearby players"\r
 seta hud_shownames_enemies 2 "1 = draw names of enemies you point at (TODO), 2 = draw names of all enemies in view"\r
-seta hud_shownames_status 1 "1 = draw health/armor status of teammates"\r
+seta hud_shownames_status 2 "1 = show when the team mate can be healed, 2 = also show health, 3 = also show armor"\r
 seta hud_shownames_aspect 8 "aspect ratio of total drawing area per name"\r
 seta hud_shownames_fontsize 12 "font size"\r
 seta hud_shownames_decolorize 1 "1 = decolorize name in team games, 2 = decolorize always"\r
index 38f708c..a1ed5f9 100644 (file)
@@ -130,16 +130,15 @@ void Draw_ShowNames(entity ent)
                        drawfontscale = '1 1 0' * resize;
                        s = textShortenToWidth(s, namewidth, '1 1 0' * cvar("hud_shownames_fontsize"), stringwidth_colors);
 
-                       if(cvar("hud_shownames_status"))
                        if(sameteam && ent.healthvalue > 0)
                        {
-                               if(ent.armorvalue)
+                               if(cvar("hud_shownames_status") > 2 && ent.armorvalue)
                                        s = strcat(s, "^7 (^1+", ftos(ent.healthvalue), "^7|^2*", ftos(ent.armorvalue), "^7)");
-                               else
+                               else if(cvar("hud_shownames_status") > 1)
                                        s = strcat(s, "^7 (^1+", ftos(ent.healthvalue), "^7)");
 
                                // if team healing is enabled, mark the team mate as possible to heal
-                               if(ent.healthvalue < teamheal_max)
+                               if(cvar("hud_shownames_status") && ent.healthvalue < teamheal_max)
                                        s = strcat(s, "^7 [^5HEAL^7]");
                        }