From: FruitieX Date: Mon, 11 Apr 2011 13:49:18 +0000 (+0300) Subject: use maxhealth/maxarmor cvars instead of constants (hud_panel_shownames) X-Git-Tag: xonotic-v0.5.0~303 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2f2bbae3858c6b383f36ae0cb0ca41502a27900d;p=xonotic%2Fxonotic-data.pk3dir.git use maxhealth/maxarmor cvars instead of constants (hud_panel_shownames) --- diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index fbde7368c..e91846941 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -4270,10 +4270,10 @@ void HUD_ShowNames(void) drawpic_aspect_skin(iconpos, "health", '1 1 0' * iconsize_y, '0 0 0', panel_fg_alpha * 0.5, DRAWFLAG_NORMAL); drawpic_aspect_skin(iconpos + '0.5 0 0' * iconsize_x, "armor", '1 1 0' * iconsize_y, '0 0 0', panel_fg_alpha * 0.5, DRAWFLAG_NORMAL); - drawsetcliparea(0, myPos_y + iconsize_y - iconsize_y * min(1, shownames_health/200), vid_conwidth, myPos_y + iconsize_y); + drawsetcliparea(0, myPos_y + iconsize_y - iconsize_y * min(1, shownames_health/autocvar_hud_panel_healtharmor_maxhealth), vid_conwidth, myPos_y + iconsize_y); drawpic_aspect_skin(iconpos, "health", '1 1 0' * iconsize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); - drawsetcliparea(0, myPos_y + iconsize_y - iconsize_y * min(1, shownames_armor/200), vid_conwidth, myPos_y + iconsize_y); + drawsetcliparea(0, myPos_y + iconsize_y - iconsize_y * min(1, shownames_armor/autocvar_hud_panel_healtharmor_maxarmor), vid_conwidth, myPos_y + iconsize_y); drawpic_aspect_skin(iconpos + '0.5 0 0' * iconsize_x, "armor", '1 1 0' * iconsize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); drawresetcliparea(); }