// - for this timelimit_overtime needs to be >0 of course
// - also check the winning condition calculated in the previous frame and only add normal overtime
// again, if at the point at which timelimit would be extended again, still no winner was found
- if (!autocvar_g_campaign && (checkrules_overtimesadded >= 0) && (checkrules_overtimesadded < autocvar_timelimit_overtimes || autocvar_timelimit_overtimes < 0) && autocvar_timelimit_overtime && !(g_race && !g_race_qualifying))
+ if (!autocvar_g_campaign && checkrules_overtimesadded >= 0
+ && (checkrules_overtimesadded < autocvar_timelimit_overtimes || autocvar_timelimit_overtimes < 0)
+ && autocvar_timelimit_overtime && !(g_race && !g_race_qualifying))
{
return 1; // need to call InitiateOvertime later
}
{
++checkrules_overtimesadded;
//add one more overtime by simply extending the timelimit
- float tl;
- tl = autocvar_timelimit;
- tl += autocvar_timelimit_overtime;
- cvar_set("timelimit", ftos(tl));
-
+ cvar_set("timelimit", ftos(autocvar_timelimit + autocvar_timelimit_overtime));
Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, CENTER_OVERTIME_TIME, autocvar_timelimit_overtime * 60);
}
{
Team_SetTeamScore(Team_GetTeamFromIndex(i), 0);
}
-
+
FOREACH_CLIENT(IS_PLAYER(it) && !IS_DEAD(it),
{
if (Team_IsValidTeam(it.team))