From: MirceaKitsune Date: Sat, 4 Sep 2010 22:46:24 +0000 (+0300) Subject: Reflect HUD background brightness if bigger than 0.25 (so the color remains visible... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a1ee3f3d8737c066454ab55c8ccbd40fdd50d542;p=voretournament%2Fvoretournament.git Reflect HUD background brightness if bigger than 0.25 (so the color remains visible with black HUD) --- diff --git a/data/qcsrc/client/sbar.qc b/data/qcsrc/client/sbar.qc index 974a2ddc..cabd0a80 100644 --- a/data/qcsrc/client/sbar.qc +++ b/data/qcsrc/client/sbar.qc @@ -2906,14 +2906,23 @@ void Sbar_Draw (void) drawpic(bottomleft - '0 256 0', "gfx/hud/bg_stomach", '256 256 0', color, sbar_alpha_bg, DRAWFLAG_NORMAL); } + vector stomach_status_color; if(getstati(STAT_STOMACH_EATEN)) { - drawpic(bottomleft - '0 256 0', "gfx/hud/bg_stomach_status", '256 256 0', Stomachstatus_Colortrans('1 0 0'), sbar_alpha_bg, DRAWFLAG_NORMAL); + stomach_status_color_x = bound(0.25, vlen(color), 1); // reflect HUD background brightness, but only up to a certain limit (so the color is still visible with black HUD) + stomach_status_color_y = 0; + stomach_status_color_z = 0; + + drawpic(bottomleft - '0 256 0', "gfx/hud/bg_stomach_status", '256 256 0', stomach_status_color, sbar_alpha_bg, DRAWFLAG_NORMAL); drawstring(bottomleft - '-80 168 0', "predator:", '8 8 0', '0 0 0', sbar_alpha_fg, DRAWFLAG_NORMAL); } else { - drawpic(bottomleft- '0 256 0', "gfx/hud/bg_stomach_status", '256 256 0', Stomachstatus_Colortrans('0 1 0'), sbar_alpha_bg, DRAWFLAG_NORMAL); + stomach_status_color_x = 0; + stomach_status_color_y = bound(0.25, vlen(color), 1); // reflect HUD background brightness, but only up to a certain limit (so the color is still visible with black HUD) + stomach_status_color_z = 0; + + drawpic(bottomleft - '0 256 0', "gfx/hud/bg_stomach_status", '256 256 0', stomach_status_color, sbar_alpha_bg, DRAWFLAG_NORMAL); drawstring(bottomleft - '-80 168 0', "self:", '8 8 0', '0 0 0', sbar_alpha_fg, DRAWFLAG_NORMAL); } }