}
else if(STAT(TIMEOUT_STATUS) == 2)
subtext = _("Timeout");
- else if (overtimes == -1)
+ else if (overtimes == BITS(24))
subtext = _("Sudden Death");
else if(overtimes == 1)
subtext = _("Overtime");
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 overtimes; // overtimes added (-1 = sudden death)
+int overtimes; // overtimes added (if set to BITS(24) (max int that can be sent) = 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!
else
{
checkrules_suddendeathend = time + 60 * autocvar_timelimit_suddendeath;
- overtimes = -1;
+ overtimes = BITS(24); // sudden death
}
if(g_race && !g_race_qualifying)
race_StartCompleting();
void InitiateOvertime() // ONLY call this if InitiateSuddenDeath returned true
{
++checkrules_overtimesadded;
+ // NOTE: here overtimes can never be < 0 so it can be safely sent as int stat; we ignore
+ // the upper limit of BITS(24) - 1 = 16777215 - 1 that in practice can never be reached in game
overtimes = checkrules_overtimesadded;
//add one more overtime by simply extending the timelimit
cvar_set("timelimit", ftos(autocvar_timelimit + autocvar_timelimit_overtime));
if(checkrules_status == WINNING_YES)
{
- if (overtimes == -1 && overtimes != overtimes_prev)
+ if (overtimes == BITS(24) && overtimes != overtimes_prev)
{
// if suddendeathend overtime has just begun, revert it
checkrules_suddendeathend = 0;