seta hud_damage_gentle_color "1 0.7 1" "color of flash for cl_gentle version"
seta hud_damage_color "1 0 0" "color of flash"
seta hud_damage_factor 0.025 "(damage * factor) = how much to add to the alpha value"
-seta hud_damage_fade_rate 1 "how much to subtract from the alpha value each second"
-seta hud_damage_maxalpha 2 "how much to limit the alpha value to"
+seta hud_damage_fade_rate 0.75 "how much to subtract from the alpha value each second"
+seta hud_damage_maxalpha 1.5 "how much to limit the alpha value to"
seta hud_damage_pain_threshold 0.1 "how much alpha to ignore (must be bigger than the hud_damage_factor so that e.g. rot is ignored)"
seta hud_damage_pain_threshold_lower 1.25 "how much we lower pain_threshold with when nearing 0 health (if pain_threshold gets negative then we always draw a flash at alpha = fabs(pain_threshold)"
seta hud_damage_pain_threshold_lower_health 50 "at which health we start lowering pain_threshold"
// fade out
myhealth_flash = max(0, myhealth_flash - autocvar_hud_damage_fade_rate * frametime);
// add new damage
- myhealth_flash = bound(0, myhealth_flash + max(0, myhealth_prev - myhealth) * autocvar_hud_damage_factor, autocvar_hud_damage_maxalpha);
+ myhealth_flash = bound(0, myhealth_flash + dmg_take * autocvar_hud_damage_factor, autocvar_hud_damage_maxalpha);
float pain_threshold, pain_threshold_lower, pain_threshold_lower_health;
pain_threshold = autocvar_hud_damage_pain_threshold;