seta hud_panel_centerprint_time 3 "message duration (NOTE: certain messages have a fixed duration)"
seta hud_panel_centerprint_fade_in 0.15 "how long a message takes to fade in"
+seta hud_panel_centerprint_fade_in_short 0 " "how long a message that lasts 2 or less seconds takes to fade in"
seta hud_panel_centerprint_fade_out 0.15 "how long a message takes to fade out (this time is included in the message duration and can't be > 5)"
seta hud_panel_centerprint_fade_subsequent 1 "enable extra fading effects for each additional message, so that the more messages you have the more they become faded out"
seta hud_panel_centerprint_fade_subsequent_passone 3 "division factor for the first pass for alpha fading, with 2 all messages after the first have half alpha"
all_messages_expired = false;
+ float fade_in_time = autocvar_hud_panel_centerprint_fade_in;
+ if (centerprint_time[j] <= 2)
+ fade_in_time = autocvar_hud_panel_centerprint_fade_in_short;
+
// fade
if(centerprint_time[j] < 0) // Expired but forced. Expire time is the fade-in time.
- a = (time - centerprint_expire_time[j]) / max(0.0001, autocvar_hud_panel_centerprint_fade_in);
+ a = (time - centerprint_expire_time[j]) / max(0.0001, fade_in_time);
else if(centerprint_expire_time[j] - autocvar_hud_panel_centerprint_fade_out > time) // Regularily printed. Not fading out yet.
- a = (time - (centerprint_expire_time[j] - centerprint_time[j])) / max(0.0001, autocvar_hud_panel_centerprint_fade_in);
+ a = (time - (centerprint_expire_time[j] - centerprint_time[j])) / max(0.0001, fade_in_time);
else // Expiring soon, so fade it out.
a = (centerprint_expire_time[j] - time) / max(0.0001, autocvar_hud_panel_centerprint_fade_out);
bool autocvar_hud_panel_centerprint;
float autocvar_hud_panel_centerprint_align;
float autocvar_hud_panel_centerprint_fade_in = 0.15;
+float autocvar_hud_panel_centerprint_fade_in_short = 0;
float autocvar_hud_panel_centerprint_fade_out = 0.15;
float autocvar_hud_panel_centerprint_fade_subsequent = 1;
float autocvar_hud_panel_centerprint_fade_subsequent_passone = 3;