X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fclient%2Fhud.qc;h=ea126f9d6d64b63c6bf64e2992775c45d99744c3;hp=216940009dfed6fa0071e0e859686803b090f8d9;hb=5dbda91e68e08abcedef699f99c3654c8f97242b;hpb=47c02cec495b4188dfc122b77393429ae257e14b diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 216940009d..ea126f9d6d 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 @@ -985,7 +985,7 @@ void HUD_Ammo(void) if (autocvar_hud_panel_ammo_onlycurrent) total_ammo_count = 1; else - total_ammo_count = AMMO_COUNT - 1; // fuel + total_ammo_count = AMMO_COUNT; if(draw_nades) { @@ -1045,6 +1045,7 @@ void HUD_Ammo(void) TRUE, infinite_ammo ); + } ++row; if(row >= rows) @@ -1052,7 +1053,6 @@ void HUD_Ammo(void) row = 0; column = column + 1; } - } } else { @@ -1060,7 +1060,6 @@ void HUD_Ammo(void) row = column = 0; for(i = 0; i < AMMO_COUNT; ++i) { - if(i == 4) continue; // fuel ammotype = GetAmmoFieldFromNum(i); DrawAmmoItem( pos + eX * column * (ammo_size_x + offset_x) + eY * row * (ammo_size_y + offset_y),