Highlight values from 0 to 100 of health and armor in the status bar above player... 633/head
authorterencehill <piuntn@gmail.com>
Fri, 25 Jan 2019 18:09:44 +0000 (19:09 +0100)
committerterencehill <piuntn@gmail.com>
Fri, 25 Jan 2019 18:10:39 +0000 (19:10 +0100)
_hud_common.cfg
qcsrc/client/autocvars.qh
qcsrc/client/shownames.qc

index 75e8eb8..e31655e 100644 (file)
@@ -186,6 +186,7 @@ seta hud_shownames_crosshairdistance_antioverlap 0 "allow antioverlap to work as
 seta hud_shownames_self 0 "also include your own name to be shown when third person camera mode is on (chase_active/cl_eventchase)"
 seta hud_shownames_status 1 "1 = draw health/armor status of teammates"
 seta hud_shownames_statusbar_height 4 "height of status bar"
+seta hud_shownames_statusbar_highlight 1 "Always highlight values of health and armor from 0 to half status bar"
 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"
index db75660..9300293 100644 (file)
@@ -381,6 +381,7 @@ float autocvar_hud_shownames_crosshairdistance_antioverlap;
 bool autocvar_hud_shownames_self;
 bool autocvar_hud_shownames_status;
 float autocvar_hud_shownames_statusbar_height;
+float autocvar_hud_shownames_statusbar_highlight = 1;
 float autocvar_hud_shownames_aspect;
 float autocvar_hud_shownames_fontsize;
 int autocvar_hud_shownames_decolorize;
index 2fc1559..53e7ae4 100644 (file)
@@ -162,6 +162,8 @@ void Draw_ShowNames(entity this)
                {
                        vector pos = namepos + eY * autocvar_hud_shownames_fontsize * resize;
                        vector sz = vec2(0.5 * mySize.x, resize * autocvar_hud_shownames_statusbar_height);
+                       if (autocvar_hud_shownames_statusbar_highlight)
+                               drawfill(pos + eX * 0.25 * mySize.x, sz, '0.7 0.7 0.7', a / 2, DRAWFLAG_NORMAL);
                        if (this.healthvalue > 0)
                        {
                                HUD_Panel_DrawProgressBar(pos, sz, "nametag_statusbar",