]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
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 75e8eb8d6f51a5d4ee6b94b804aea9eaac9a0d45..e31655e25823512d2bfe20b7897b83fd2f85e643 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 db756608defe4a18404579bd22bca0c42b97625c..9300293408650e62da25f95b5d63ce824e29b098 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 2fc1559494728343e27fed7b3282f2c37d668a0e..53e7ae4a9181b56d186368b3eeb7532dae3ea9b6 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",