seta hud_panel_powerups_hide_ondeath 0 "hide this panel when dead"
+seta hud_panel_healtharmor_oxygenbar_startalpha "0.2" "start alpha of the oxygen bar"
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"
mySize -= '2 2 0' * panel_bg_padding;
}
- float air_alpha = 1;
- if (STAT(AIR_FINISHED) && time > STAT(AIR_FINISHED))
+ float air_alpha;
+ if (!STAT(AIR_FINISHED))
+ air_alpha = 0;
+ else if (time > STAT(AIR_FINISHED))
{
air_alpha = blink_synced(0.5, 0.5, 7, STAT(AIR_FINISHED), -1);
air_time = 10;
}
+ else
+ {
+ float fade_time = 10 / 2;
+ float start_alpha = autocvar_hud_panel_healtharmor_oxygenbar_startalpha;
+ float f = (STAT(AIR_FINISHED) - time - fade_time) / fade_time;
+ air_alpha = bound(0, start_alpha + (1 - start_alpha) * (1 - f), 1);
+ }
int baralign = autocvar_hud_panel_healtharmor_baralign;
int iconalign = autocvar_hud_panel_healtharmor_iconalign;
int autocvar_hud_panel_healtharmor_iconalign;
int autocvar_hud_panel_healtharmor_maxarmor;
int autocvar_hud_panel_healtharmor_maxhealth;
+float autocvar_hud_panel_healtharmor_oxygenbar_startalpha = 0.2;
bool autocvar_hud_panel_healtharmor_progressbar;
string autocvar_hud_panel_healtharmor_progressbar_armor;
string autocvar_hud_panel_healtharmor_progressbar_health;