seta hud_panel_weapons_ammo_full_plasma 180 "show 100% of the status bar at this ammo count"
seta hud_panel_weapons_ammo_full_rockets 160 "show 100% of the status bar at this ammo count"
seta hud_panel_weapons_ammo_full_fuel 100 "show 100% of the status bar at this ammo count"
+seta hud_panel_weapons_hide_ondeath 0 "hide this panel when dead"
seta hud_panel_ammo_maxammo "40" "when you have this much ammo, the ammo status bar is full"
+seta hud_panel_ammo_hide_ondeath 0 "hide this panel when dead"
+
+seta hud_panel_powerups_hide_ondeath 0 "hide this panel when dead"
seta hud_panel_healtharmor_maxhealth "200" "when you have this much health, the health status bar is full"
seta hud_panel_healtharmor_maxarmor "200" "when you have this much armor, the armor status bar is full"
seta hud_panel_healtharmor_progressbar_gfx_damage 5 "show damage effect when damaged at least by this amount; 0 disables the effect"
seta hud_panel_healtharmor_progressbar_gfx_lowhealth 40 "health progressbar blinks when health is lower than this amount"
+seta hud_panel_healtharmor_hide_ondeath 0 "hide this panel when dead"
seta hud_panel_timer_increment "0" "show elapsed time instead of remaining time"
bool autocvar_hud_panel_physics_dynamichud = true;
bool autocvar_hud_panel_centerprint_dynamichud = true;
bool autocvar_hud_panel_itemstime_dynamichud = true;
+bool autocvar_hud_panel_healtharmor_hide_ondeath = false;
+bool autocvar_hud_panel_ammo_hide_ondeath = false;
+bool autocvar_hud_panel_powerups_hide_ondeath = false;
+bool autocvar_hud_panel_weapons_hide_ondeath = false;
bool autocvar_hud_panel_ammo;
bool autocvar_hud_panel_ammo_iconalign;
int autocvar_hud_panel_ammo_maxammo;
if(hud != HUD_NORMAL) return;
if(!autocvar__hud_configure)
{
- if(!autocvar_hud_panel_ammo) return;
- if(spectatee_status == -1) return;
+ if((!autocvar_hud_panel_ammo) || (spectatee_status == -1))
+ return;
+ if(STAT(HEALTH) < 1 && autocvar_hud_panel_ammo_hide_ondeath)
+ return;
}
HUD_Panel_UpdateCvars();
int armor, health, fuel;
if(!autocvar__hud_configure)
{
- if(!autocvar_hud_panel_healtharmor) return;
+ if((!autocvar_hud_panel_healtharmor) || (spectatee_status == -1))
+ return;
if(hud != HUD_NORMAL) return;
- if(spectatee_status == -1) return;
health = STAT(HEALTH);
if(health <= 0)
{
+ health = 0;
prev_health = -1;
- return;
+ if(autocvar_hud_panel_healtharmor_hide_ondeath)
+ return;
}
armor = STAT(ARMOR);
- // code to check for spectatee_status changes is in Ent_ClientData()
+ // code to check for spectatee_status changes is in ENT_CLIENT_CLIENTDATA
// prev_p_health and prev_health can be set to -1 there
if (prev_p_health == -1)
// Initialize items
if(!autocvar__hud_configure)
{
- if(!autocvar_hud_panel_powerups) return;
- if(spectatee_status == -1) return;
- if(STAT(HEALTH) <= 0) return;
+ if((!autocvar_hud_panel_powerups) || (spectatee_status == -1))
+ return;
+ if(STAT(HEALTH) <= 0 && autocvar_hud_panel_powerups_hide_ondeath)
+ return;
if(!(allItems & (ITEM_Strength.m_itemid | ITEM_Shield.m_itemid | IT_SUPERWEAPON)) && !allBuffs) return;
strengthTime = bound(0, STAT(STRENGTH_FINISHED) - time, 99);
{
if((!autocvar_hud_panel_weapons) || (spectatee_status == -1))
return;
+ if(STAT(HEALTH) <= 0 && autocvar_hud_panel_weapons_hide_ondeath)
+ return;
if(timeout && time >= weapontime + timeout + timeout_effect_length)
if(autocvar_hud_panel_weapons_timeout_effect == 3 || (autocvar_hud_panel_weapons_timeout_effect == 1 && !(autocvar_hud_panel_weapons_timeout_fadebgmin + autocvar_hud_panel_weapons_timeout_fadefgmin)))
{