From: FruitieX Date: Tue, 27 Jul 2010 13:42:33 +0000 (+0300) Subject: "ghost" ammo icons X-Git-Tag: xonotic-v0.1.0preview~400^2^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d94813e51ef7807cea043739ed1a3ab586d5cf7d;p=xonotic%2Fxonotic-data.pk3dir.git "ghost" ammo icons --- 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)