From 04a21a87479d92c277cc18a092489a05b84020e8 Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Sat, 9 Jul 2011 14:15:19 +0300 Subject: [PATCH 1/1] Change how the status setting works for shownames. Also, don't show armor by default for team mates --- data/defaultVT.cfg | 2 +- data/qcsrc/client/shownames.qc | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/data/defaultVT.cfg b/data/defaultVT.cfg index 1c906113..4d2f97e4 100644 --- a/data/defaultVT.cfg +++ b/data/defaultVT.cfg @@ -1150,7 +1150,7 @@ seta hud_contents_stomach_color "0.3 0.2 0" seta hud_shownames 1 "draw names and health/armor of nearby players" seta hud_shownames_enemies 2 "1 = draw names of enemies you point at (TODO), 2 = draw names of all enemies in view" -seta hud_shownames_status 1 "1 = draw health/armor status of teammates" +seta hud_shownames_status 2 "1 = show when the team mate can be healed, 2 = also show health, 3 = also show armor" seta hud_shownames_aspect 8 "aspect ratio of total drawing area per name" seta hud_shownames_fontsize 12 "font size" seta hud_shownames_decolorize 1 "1 = decolorize name in team games, 2 = decolorize always" diff --git a/data/qcsrc/client/shownames.qc b/data/qcsrc/client/shownames.qc index 38f708c9..a1ed5f99 100644 --- a/data/qcsrc/client/shownames.qc +++ b/data/qcsrc/client/shownames.qc @@ -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]"); } -- 2.39.2