}
// Subtext
- int overtimes = STAT(OVERTIMESADDED);
+ int overtimes = STAT(OVERTIMES);
if(warmup_stage || autocvar__hud_configure)
subtext = _("Warmup");
else if(STAT(TIMEOUT_STATUS))
subtext = _("Timeout");
+ else if (overtimes == -1)
+ subtext = _("Sudden Death");
+ else if(overtimes == 1)
+ subtext = _("Overtime");
else if (overtimes >= 2)
subtext = sprintf(_("Overtime #%d"), overtimes);
- else if(overtimes)
- subtext = _("Overtime");
subtext_size = vec2(mySize.x, mySize.y / 3);
timer_size = vec2(mySize.x, mySize.y - subtext_size.y);
float game_starttime; //point in time when the countdown to game start is over
float round_starttime; //point in time when the countdown to round start is over
int autocvar_leadlimit;
-int checkrules_overtimesadded;
+int overtimes; // overtimes added (-1 = sudden death)
int timeout_status; // (values: 0, 1, 2) contains whether a timeout is not active (0), was called but still at leadtime (1) or is active (2)
// TODO: world.qh can't be included here due to circular includes!
REGISTER_STAT(SECRETS_FOUND, int, secrets_found)
REGISTER_STAT(RESPAWN_TIME, float)
REGISTER_STAT(ROUNDSTARTTIME, float, round_starttime)
-REGISTER_STAT(OVERTIMESADDED, int, checkrules_overtimesadded)
+REGISTER_STAT(OVERTIMES, int, overtimes)
REGISTER_STAT(TIMEOUT_STATUS, int, timeout_status)
REGISTER_STAT(MONSTERS_TOTAL, int)
REGISTER_STAT(MONSTERS_KILLED, int)
// clear overtime, we have to decrease timelimit to its original value again.
if (checkrules_overtimesadded > 0 && g_race_qualifying != 2)
cvar_set("timelimit", ftos(autocvar_timelimit - (checkrules_overtimesadded * autocvar_timelimit_overtime)));
- checkrules_suddendeathend = checkrules_overtimesadded = checkrules_suddendeathwarning = 0;
+ checkrules_suddendeathend = checkrules_overtimesadded = checkrules_suddendeathwarning = overtimes = 0;
if(warmup_stage)
game_starttime = time; // Warmup: No countdown in warmup
if(!checkrules_suddendeathend)
{
if(autocvar_g_campaign)
+ {
checkrules_suddendeathend = time; // no suddendeath in campaign
+ }
else
+ {
checkrules_suddendeathend = time + 60 * autocvar_timelimit_suddendeath;
+ overtimes = -1;
+ }
if(g_race && !g_race_qualifying)
race_StartCompleting();
}
void InitiateOvertime() // ONLY call this if InitiateSuddenDeath returned true
{
++checkrules_overtimesadded;
+ overtimes = checkrules_overtimesadded;
//add one more overtime by simply extending the timelimit
cvar_set("timelimit", ftos(autocvar_timelimit + autocvar_timelimit_overtime));
Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, CENTER_OVERTIME_TIME, autocvar_timelimit_overtime * 60);
float checkrules_equality;
float checkrules_suddendeathwarning;
float checkrules_suddendeathend;
+int checkrules_overtimesadded; //how many overtimes have been already added
// flag set on worldspawn so that the code knows if it is dedicated or not
bool server_is_dedicated;