From 531c25df6a8e61e3839087568a44dc80d3e47f90 Mon Sep 17 00:00:00 2001 From: terencehill Date: Sun, 14 Dec 2014 23:45:20 +0100 Subject: [PATCH] Fix ammo panel bug in hud_config mode --- qcsrc/client/hud.qc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index e78a69108..7359468e0 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -933,16 +933,16 @@ void DrawAmmoItem(vector myPos, vector mySize, .float ammotype, float currently_ if(currently_selected) drawpic_aspect_skin(myPos, "ammo_current_bg", mySize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); - if(a > 0 && autocvar_hud_panel_ammo_progressbar) - HUD_Panel_DrawProgressBar(myPos + eX * autocvar_hud_panel_ammo_progressbar_xoffset * mySize_x, mySize - eX * autocvar_hud_panel_ammo_progressbar_xoffset * mySize_x, autocvar_hud_panel_ammo_progressbar_name, a/autocvar_hud_panel_ammo_maxammo, 0, 0, color, autocvar_hud_progressbar_alpha * panel_fg_alpha * theAlpha, DRAWFLAG_NORMAL); + if(a > 0 && autocvar_hud_panel_ammo_progressbar) + HUD_Panel_DrawProgressBar(myPos + eX * autocvar_hud_panel_ammo_progressbar_xoffset * mySize_x, mySize - eX * autocvar_hud_panel_ammo_progressbar_xoffset * mySize_x, autocvar_hud_panel_ammo_progressbar_name, a/autocvar_hud_panel_ammo_maxammo, 0, 0, color, autocvar_hud_progressbar_alpha * panel_fg_alpha * theAlpha, DRAWFLAG_NORMAL); - if(autocvar_hud_panel_ammo_text) - { - if(a > 0 || infinite_ammo) - drawstring_aspect(numpos, ftos(a), eX * (2/3) * mySize_x + eY * mySize_y, color, panel_fg_alpha * theAlpha, DRAWFLAG_NORMAL); - else // "ghost" ammo count - drawstring_aspect(numpos, ftos(a), eX * (2/3) * mySize_x + eY * mySize_y, '0 0 0', panel_fg_alpha * theAlpha * 0.5, DRAWFLAG_NORMAL); - } + if(autocvar_hud_panel_ammo_text) + { + if(a > 0 || infinite_ammo) + drawstring_aspect(numpos, ftos(a), eX * (2/3) * mySize_x + eY * mySize_y, color, panel_fg_alpha * theAlpha, DRAWFLAG_NORMAL); + else // "ghost" ammo count + drawstring_aspect(numpos, ftos(a), eX * (2/3) * mySize_x + eY * mySize_y, '0 0 0', panel_fg_alpha * theAlpha * 0.5, DRAWFLAG_NORMAL); + } if(a > 0 || infinite_ammo) drawpic_aspect_skin(picpos, GetAmmoPicture(ammotype), '1 1 0' * mySize_y, '1 1 1', panel_fg_alpha * theAlpha, DRAWFLAG_NORMAL); else // "ghost" ammo icon @@ -1044,6 +1044,7 @@ void HUD_Ammo(void) TRUE, infinite_ammo ); + } ++row; if(row >= rows) @@ -1051,7 +1052,6 @@ void HUD_Ammo(void) row = 0; column = column + 1; } - } } else { -- 2.39.2