Change how the status setting works for shownames. Also, don't show armor by default...
[voretournament/voretournament.git] / data / qcsrc / client / shownames.qc
index 38f708c9730bbba8511f3b5abefcfeb4a5c584df..a1ed5f9990e2959a52c03ccb3e69e0b8b5f83904 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);
 
                        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(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)");
                                        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
                                        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]");
                        }
 
                                        s = strcat(s, "^7 [^5HEAL^7]");
                        }