X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fclient%2Fhud%2Fpanel%2Fammo.qc;h=b4a7b6040a92cd5f980253d8a4f51858c5df2662;hp=bd9aa1a21ca53afe3837d12bdf1fef3771ac4940;hb=4e21f418ad9e6287efb942c1fa2861a51981110a;hpb=9e50112561ad6f4cefe6d13bd7185f5dfd1ada4b diff --git a/qcsrc/client/hud/panel/ammo.qc b/qcsrc/client/hud/panel/ammo.qc index bd9aa1a21..b4a7b6040 100644 --- a/qcsrc/client/hud/panel/ammo.qc +++ b/qcsrc/client/hud/panel/ammo.qc @@ -1,15 +1,26 @@ #include "ammo.qh" -#include -#include -#include +#include +#include #include -#include -#include #include +#include // Ammo (#1) +void HUD_Ammo_Export(int fh) +{ + // allow saving cvars that aesthetically change the panel into hud skin files + HUD_Write_Cvar("hud_panel_ammo_onlycurrent"); + HUD_Write_Cvar("hud_panel_ammo_noncurrent_alpha"); + HUD_Write_Cvar("hud_panel_ammo_noncurrent_scale"); + HUD_Write_Cvar("hud_panel_ammo_iconalign"); + HUD_Write_Cvar("hud_panel_ammo_progressbar"); + HUD_Write_Cvar("hud_panel_ammo_progressbar_name"); + HUD_Write_Cvar("hud_panel_ammo_progressbar_xoffset"); + HUD_Write_Cvar("hud_panel_ammo_text"); +} + void DrawNadeProgressBar(vector myPos, vector mySize, float progress, vector color) { HUD_Panel_DrawProgressBar( @@ -104,7 +115,7 @@ void HUD_Ammo() { if((!autocvar_hud_panel_ammo) || (spectatee_status == -1)) return; - if(STAT(HEALTH) < 1 && autocvar_hud_panel_ammo_hide_ondeath) + if(STAT(HEALTH) <= 0 && autocvar_hud_panel_ammo_hide_ondeath) return; } @@ -177,7 +188,7 @@ void HUD_Ammo() Weapon wep = wepent.switchweapon; int i; - bool infinite_ammo = (STAT(ITEMS) & IT_UNLIMITED_WEAPON_AMMO); + bool infinite_ammo = (STAT(ITEMS) & IT_UNLIMITED_AMMO); row = column = 0; if(autocvar_hud_panel_ammo_onlycurrent) {