From: MirceaKitsune Date: Mon, 18 Jul 2011 15:44:47 +0000 (+0300) Subject: Do not show 0/ when there's no prey X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6527cb74648f8c5dfd2dfb43872a9422ff9cc1c6;p=voretournament%2Fvoretournament.git Do not show 0/ when there's no prey --- diff --git a/data/qcsrc/client/sbar.qc b/data/qcsrc/client/sbar.qc index 4b646a50..fd3c1bbf 100644 --- a/data/qcsrc/client/sbar.qc +++ b/data/qcsrc/client/sbar.qc @@ -3033,10 +3033,13 @@ void Sbar_Draw (void) vector status_pos; string status_text; - status_text = strcat(ftos(stomach_load), "/", ftos(stomach_maxload), "%"); + if(stomach_load) + status_text = strcat(ftos(stomach_load), "^8/^7", ftos(stomach_maxload), "%"); + else + status_text = strcat(ftos(stomach_maxload), "%"); status_pos = bottomleft - '-44 168 0'; - status_pos -= '1 0 0' * stringwidth(status_text, FALSE, '16 16 0') * 0.5; - drawstring(status_pos, status_text, '16 16 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); + status_pos -= '1 0 0' * stringwidth(status_text, TRUE, '16 16 0') * 0.5; + drawcolorcodedstring(status_pos, status_text, '16 16 0', sbar_alpha_fg, DRAWFLAG_NORMAL); if(getstati(STAT_VORE_DIGESTING)) // we are currently digesting drawpic(bottomleft - '-35 149 0', "gfx/hud/sb_digestion", '16 16 0', '0 1 0', sbar_alpha_fg, DRAWFLAG_NORMAL);