From d31b047f20aaff05c665c73536905e4c40f83346 Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Sun, 27 Feb 2011 00:24:48 +0200 Subject: [PATCH] First part of reintegrating HUD armor. Text is now positioned properly at all values. --- data/qcsrc/client/sbar.qc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/data/qcsrc/client/sbar.qc b/data/qcsrc/client/sbar.qc index 8eafa1e6..54e1aa14 100644 --- a/data/qcsrc/client/sbar.qc +++ b/data/qcsrc/client/sbar.qc @@ -3025,8 +3025,19 @@ void Sbar_Draw (void) } } - vector health_pos; + vector health_pos, armor_pos; health_pos = bottom - '77 58 0'; + armor_pos = bottom - '62 68 0'; + + // armor + x = armor; + if (x > 0) + { + drawpic(armor_pos + '0 -20.5 0', "gfx/hud/sb_armor", '16 16 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); + if(x < 100) armor_pos_x -= 4.5; // always center + if(x < 10) armor_pos_x -= 6.5; // always center + Sbar_DrawXNum_Colored(armor_pos, x, 12, sbar_alpha_fg); + } // health x = health; -- 2.39.2