From: terencehill Date: Fri, 25 Jan 2019 18:09:44 +0000 (+0100) Subject: Highlight values from 0 to 100 of health and armor in the status bar above player... X-Git-Tag: xonotic-v0.8.5~1635^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4675bba7904ba8c2d480fe0087c52a05a9b7a600;p=xonotic%2Fxonotic-data.pk3dir.git Highlight values from 0 to 100 of health and armor in the status bar above player's head --- diff --git a/_hud_common.cfg b/_hud_common.cfg index 75e8eb8d6..e31655e25 100644 --- a/_hud_common.cfg +++ b/_hud_common.cfg @@ -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" diff --git a/qcsrc/client/autocvars.qh b/qcsrc/client/autocvars.qh index db756608d..930029340 100644 --- a/qcsrc/client/autocvars.qh +++ b/qcsrc/client/autocvars.qh @@ -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; diff --git a/qcsrc/client/shownames.qc b/qcsrc/client/shownames.qc index 2fc155949..53e7ae4a9 100644 --- a/qcsrc/client/shownames.qc +++ b/qcsrc/client/shownames.qc @@ -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",