j = 0;
if (new_id && new_id == centerprint_msgID[j])
{
- if (strMessage == "" && centerprint_messages[j] != "" && centerprint_countdown_num[j] == 0)
+ if (strMessage == "" && centerprint_messages[j] != "")
{
// fade out the current msg (duration and countdown_num are ignored)
+ centerprint_start_time[j] = 0;
centerprint_time[j] = min(5, autocvar_hud_panel_centerprint_fade_out);
centerprint_expire_time[j] = -1; // don't use the variable time here!
return;
}
if (centerprint_expire_time[j] <= time)
{
- if (centerprint_countdown_num[j] && centerprint_time[j] > 0)
+ if (centerprint_countdown_num[j] && centerprint_time[j] > 0 && centerprint_start_time[j])
{
centerprint_countdown_num[j] = centerprint_countdown_num[j] - 1;
if (centerprint_countdown_num[j] == 0)
float fade_in_time = autocvar_hud_panel_centerprint_fade_in;
float fade_out_time = autocvar_hud_panel_centerprint_fade_out;
- if (centerprint_countdown_num[j]) {
+ if (centerprint_countdown_num[j] && centerprint_start_time[j]) {
fade_in_time = 0;
fade_out_time = 0;
}