From 6527cb74648f8c5dfd2dfb43872a9422ff9cc1c6 Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Mon, 18 Jul 2011 18:44:47 +0300 Subject: [PATCH] Do not show 0/ when there's no prey --- data/qcsrc/client/sbar.qc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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); -- 2.39.2