From: terencehill Date: Sun, 16 Sep 2018 11:13:24 +0000 (+0200) Subject: Small cleanup X-Git-Tag: xonotic-v0.8.5~1855 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3b85e0c81d93289159ae742d8f5c8cf92748f5fd;p=xonotic%2Fxonotic-data.pk3dir.git Small cleanup --- diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index 038936ee4..28aa46cc4 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -1611,7 +1611,9 @@ float InitiateSuddenDeath() // - 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 } @@ -1634,11 +1636,7 @@ void InitiateOvertime() // ONLY call this if InitiateSuddenDeath returned true { ++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); } @@ -1777,7 +1775,7 @@ float WinningCondition_RanOutOfSpawns() { Team_SetTeamScore(Team_GetTeamFromIndex(i), 0); } - + FOREACH_CLIENT(IS_PLAYER(it) && !IS_DEAD(it), { if (Team_IsValidTeam(it.team))