From: MirceaKitsune Date: Sat, 26 Feb 2011 22:24:48 +0000 (+0200) Subject: First part of reintegrating HUD armor. Text is now positioned properly at all values. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d31b047f20aaff05c665c73536905e4c40f83346;p=voretournament%2Fvoretournament.git First part of reintegrating HUD armor. Text is now positioned properly at all values. --- 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;