From 7e46a67a0a2cda32bf4e9e30f4e42efd18d25864 Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Fri, 15 Apr 2011 02:58:50 +0300 Subject: [PATCH] Fix health and armor positions with all fonts. Still more to fix however --- data/qcsrc/client/sbar.qc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/data/qcsrc/client/sbar.qc b/data/qcsrc/client/sbar.qc index 78f7d2af..da8488bb 100644 --- a/data/qcsrc/client/sbar.qc +++ b/data/qcsrc/client/sbar.qc @@ -2986,21 +2986,20 @@ void Sbar_Draw (void) vector health_pos, armor_pos; health_pos = bottom - '43 58 0'; - armor_pos = bottom - '52.5 68 0'; + armor_pos = bottom - '43 68 0'; // armor x = armor; if (x > 0) { - drawpic(armor_pos + '0 -13.5 0', "gfx/hud/sb_armor", '16 16 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); - if(x < 100) armor_pos_x += 2.5; // always center - if(x < 10) armor_pos_x += 2.5; // always center + drawpic(armor_pos + '-8 -13.5 0', "gfx/hud/sb_armor", '16 16 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); + armor_pos -= '1 0 0' * stringwidth(ftos(x), FALSE, '12 12 0') * 0.5; Sbar_DrawXNum_Colored(armor_pos, x, 12, sbar_alpha_fg); } // health x = health; - drawpic(health_pos + '0 16 0', "gfx/hud/sb_health", '32 32 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); + drawpic(health_pos + '-11 16 0', "gfx/hud/sb_health", '32 32 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); health_pos -= '1 0 0' * stringwidth(ftos(x), FALSE, '22 22 0') * 0.5; Sbar_DrawXNum_Colored(health_pos, x, 22, sbar_alpha_fg); -- 2.39.2