float centerprint_time[CENTERPRINT_MAX_MSGS];
float centerprint_expire_time[CENTERPRINT_MAX_MSGS];
float centerprint_countdown_num[CENTERPRINT_MAX_MSGS];
+float centerprint_showing;
void centerprint_generic(float new_id, string strMessage, float duration, float countdown_num)
{
if(strMessage == "" && new_id == 0)
return;
+ if (!centerprint_showing)
+ centerprint_showing = TRUE;
+
if(duration == 0)
duration = max(1, autocvar_hud_panel_centerprint_time);
}
HUD_Panel_DrawBg(1);
+
+ if (!centerprint_showing)
+ return;
+
if(panel_bg_padding)
{
panel_pos += '1 1 0' * panel_bg_padding;
vector pos;
string ts;
+ n = -1; // if no msg will be displayed, n stays -1
+
pos = panel_pos;
if (autocvar_hud_panel_centerprint_flip)
pos_y += panel_size_y;
}
}
drawfontscale = '1 1 0';
+ if (n == -1)
+ {
+ centerprint_showing = FALSE;
+ reset_centerprint_messages();
+ }
}
/*