From d94813e51ef7807cea043739ed1a3ab586d5cf7d Mon Sep 17 00:00:00 2001 From: FruitieX Date: Tue, 27 Jul 2010 16:42:33 +0300 Subject: [PATCH] "ghost" ammo icons --- qcsrc/client/hud.qc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index e85d3b3b1..f2b900fa9 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -1696,9 +1696,15 @@ void DrawAmmoItem(vector myPos, vector mySize, float itemcode, float currently_s drawpic_aspect_skin(newPos, "ammo_current_bg", newSize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); drawfont = hud_bigfont; - drawstring_aspect(numpos, ftos(a), eX * (2/3) * newSize_x + eY * newSize_y, color, panel_fg_alpha * alpha, DRAWFLAG_NORMAL); + if(a > 0) + drawstring_aspect(numpos, ftos(a), eX * (2/3) * newSize_x + eY * newSize_y, color, panel_fg_alpha * alpha, DRAWFLAG_NORMAL); + else // "ghost" ammo count + drawstring_aspect(numpos, ftos(a), eX * (2/3) * newSize_x + eY * newSize_y, '0 0 0', panel_fg_alpha * alpha * 0.5, DRAWFLAG_NORMAL); drawfont = hud_font; - drawpic_aspect_skin(picpos, GetAmmoPicture(itemcode), '1 1 0' * newSize_y, '1 1 1', panel_fg_alpha * alpha, DRAWFLAG_NORMAL); + if(a > 0) + drawpic_aspect_skin(picpos, GetAmmoPicture(itemcode), '1 1 0' * newSize_y, '1 1 1', panel_fg_alpha * alpha, DRAWFLAG_NORMAL); + else // "ghost" ammo icon + drawpic_aspect_skin(picpos, GetAmmoPicture(itemcode), '1 1 0' * newSize_y, '0 0 0', panel_fg_alpha * alpha * 0.5, DRAWFLAG_NORMAL); } void HUD_Ammo(void) -- 2.39.2