From 8d1f3d8412a7b19ae65af3a3afa03644b4e5053b Mon Sep 17 00:00:00 2001 From: Marco Hladik Date: Sun, 29 Aug 2021 19:43:09 +0200 Subject: [PATCH] HUD: Make armor display appear from bottom to top. --- src/client/hud.qc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/client/hud.qc b/src/client/hud.qc index 18e652c..59a055b 100644 --- a/src/client/hud.qc +++ b/src/client/hud.qc @@ -208,13 +208,13 @@ HUD_DrawArmor(void) ); if (pl.armor > 0) { + float perc = (pl.armor / 100); drawsubpic( - pos + [-80,-9], - [40, 40 * (pl.armor / 100)], + pos + [-80,-9] + [0, 40 * (1.0-perc)], + [40, 40 * perc], g_hud7_spr, - [spr_suit1[0], - spr_suit1[1]], - [spr_suit1[2], spr_suit1[3] * (pl.armor / 100)], + [spr_suit1[0],spr_suit1[1] + spr_suit1[3] * (1.0-perc)], + [spr_suit1[2], spr_suit1[3] * perc], g_hud_color, pSeatLocal->m_flArmorAlpha, DRAWFLAG_ADDITIVE