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 1 "add graphic effects to the progressbars when spawning and when being damaged"
+seta hud_panel_healtharmor_progressbar_gfx_damage 5 "show damage effect when damaged at least by this amount; 0 disables damage effect"
seta hud_panel_notify_time 10 "time that a new entry stays until it fades out"
seta hud_panel_notify_fadetime 3 "fade out time"
float autocvar_hud_panel_healtharmor_progressbar;
string autocvar_hud_panel_healtharmor_progressbar_armor;
string autocvar_hud_panel_healtharmor_progressbar_health;
-string autocvar_hud_panel_healtharmor_progressbar_gfx;
+float autocvar_hud_panel_healtharmor_progressbar_gfx;
+float autocvar_hud_panel_healtharmor_progressbar_gfx_damage;
float autocvar_hud_panel_healtharmor_text;
float autocvar_hud_panel_infomessages;
float autocvar_hud_panel_infomessages_flip;
pain_health_alpha = 1;
if (autocvar_hud_panel_healtharmor_progressbar_gfx)
{
- if (saved_health == -1)
+ if (autocvar_hud_panel_healtharmor_progressbar_gfx_damage > 0 && saved_health == -1)
{
- if (prev_health == 0 || prev_health - health >= 3)
+ if (prev_health == 0 || prev_health - health >= autocvar_hud_panel_healtharmor_progressbar_gfx_damage)
{
health_time = time;
saved_health = prev_health;
else
{
HUD_Panel_DrawProgressBar(pos + health_offset, mySize, autocvar_hud_panel_healtharmor_progressbar_health, saved_health/maxhealth, is_vertical, health_baralign, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * (1 - d * d), DRAWFLAG_NORMAL);
- if (prev_health - health >= 1) //refresh the effect if repeatedly damaged
+ if (prev_health - health >= autocvar_hud_panel_healtharmor_progressbar_gfx_damage) //refresh the effect if repeatedly damaged
health_time = time;
}
}
p_armor = armor;
if (autocvar_hud_panel_healtharmor_progressbar_gfx)
{
- if (saved_armor == -1)
+ if (autocvar_hud_panel_healtharmor_progressbar_gfx_damage > 0 && saved_armor == -1)
{
- if (prev_armor == 0 || prev_armor - armor >= 3)
+ if (prev_armor == 0 || prev_armor - armor >= autocvar_hud_panel_healtharmor_progressbar_gfx_damage)
{
armor_time = time;
saved_armor = prev_armor;
else
{
HUD_Panel_DrawProgressBar(pos + armor_offset, mySize, autocvar_hud_panel_healtharmor_progressbar_armor, saved_armor/maxarmor, is_vertical, armor_baralign, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * (1 - d * d), DRAWFLAG_NORMAL);
- if (prev_armor - armor >= 1) //refresh the effect if repeatedly damaged
+ if (prev_armor - armor >= autocvar_hud_panel_healtharmor_progressbar_gfx_damage) //refresh the effect if repeatedly damaged
armor_time = time;
}
}