#include <client/mutators/_mod.qh>
#include <common/notifications/all.qh>
#include <common/stats.qh>
+#include <common/mapinfo.qh>
bool announcer_1min;
bool announcer_5min;
Local_Notification(MSG_CENTER, CENTER_COUNTDOWN_ROUNDSTOP);
delete(this);
announcer_countdown = NULL;
+ centerprint_ClearTitle();
return;
}
float countdown = (inround ? roundstarttime - time : starttime - time);
float countdown_rounded = floor(0.5 + countdown);
+ if(time >= starttime) centerprint_ClearTitle();
+
if(countdown <= 0) // countdown has finished, starttime is now
{
Local_Notification(MSG_CENTER, CENTER_COUNTDOWN_BEGIN);
Local_Notification(MSG_MULTI, MULTI_COUNTDOWN_BEGIN);
delete(this);
announcer_countdown = NULL;
+ centerprint_ClearTitle();
return;
}
else // countdown is still going
{
if(inround)
{
- Local_Notification(MSG_CENTER, CENTER_COUNTDOWN_ROUNDSTART, countdown_rounded);
+ Local_Notification(MSG_CENTER, CENTER_COUNTDOWN_ROUNDSTART, STAT(ROUNDS_PLAYED) + 1, countdown_rounded);
Notification annce_num = Announcer_PickNumber(CNT_ROUNDSTART, countdown_rounded);
if(annce_num != NULL)
Local_Notification(MSG_ANNCE, annce_num);
* timelimit, fraglimit and game_starttime! Requires engine changes (remove STAT_TIMELIMIT
* and STAT_FRAGLIMIT to be auto-sent)
*/
- float previous_game_starttime;
+float previous_game_starttime;
void Announcer_Gamestart()
{
float startTime = STAT(GAMESTARTTIME);
setthink(announcer_countdown, Announcer_Countdown);
}
- if(time + 5.0 < startTime) // if connecting to server while restart was active don't always play prepareforbattle
- if(time > announcer_countdown.nextthink) // don't play it again if countdown was already going
- Local_Notification(MSG_ANNCE, ANNCE_PREPARE);
+ if(!warmup_stage && time < STAT(GAMESTARTTIME))
+ {
+ centerprint_SetTitle(strcat("^BG", MapInfo_Type_ToText(gametype))); // Set centerprint title
+ if(time + 5.0 < startTime) // if connecting to server while restart was active don't always play prepareforbattle
+ Local_Notification(MSG_ANNCE, ANNCE_PREPARE);
+ }
announcer_countdown.nextthink = startTime - floor(startTime - time + 0.5); //synchronize nextthink to startTime
}