ofs = -ofs;
}
org = scr_center + ofs;
- float alpha = bound(0, autocvar_cl_hit_indicator_fade_alpha, 1);
- alpha *= 1 - (time - HitIndicator_time[i]) / HitIndicator_fade_time;
+ float alpha_max = bound(0.1, autocvar_cl_hit_indicator_fade_alpha_max, 1);
+ float alpha_min = bound(0, autocvar_cl_hit_indicator_fade_alpha_min, alpha_max);
+ float alpha = alpha_min;
+ alpha += (alpha_max - alpha_min) * (1 - (time - HitIndicator_time[i]) / HitIndicator_fade_time);
float size = autocvar_cl_hit_indicator_size;
size = map_bound_ranges(HitIndicator_damage[i], 30, 90, size, size * 2);
org = drawspritearrow(org, ang, autocvar_cl_hit_indicator_color, alpha, size, true);
bool autocvar_cl_hit_indicator = 1;
vector autocvar_cl_hit_indicator_color = '1 0 0';
-float autocvar_cl_hit_indicator_fade_alpha = 0.8;
+float autocvar_cl_hit_indicator_fade_alpha_max = 0.8;
+float autocvar_cl_hit_indicator_fade_alpha_min = 0.4;
float autocvar_cl_hit_indicator_fade_time = 1.5;
float autocvar_cl_hit_indicator_radius = 0.15;
float autocvar_cl_hit_indicator_size = 1.1;
seta cl_hit_indicator 1 "show a 2d directional indicator around the screen center when a player hits you"
seta cl_hit_indicator_color "1 0 0" "hit indicator color"
seta cl_hit_indicator_fade_time 1.5 "how long hit indicator takes to fade away in seconds (max 2 seconds)"
-seta cl_hit_indicator_fade_alpha 0.8 "initial hit indicator alpha"
+seta cl_hit_indicator_fade_alpha_max 0.8 "initial hit indicator alpha"
+seta cl_hit_indicator_fade_alpha_min 0.4 "final hit indicator alpha"
seta cl_hit_indicator_radius 0.15 "show the directional indicator at this percentage of the screen from the center"
seta cl_hit_indicator_size 1.1 "hit indicator size"
seta cl_hit_indicator_text 0 "show damage text together with the hit indicator"