]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/world.qc
Avoid changing timelimit in the endmatch alias so that the timer shows the correct...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / world.qc
index be272b1fc10d1af45773889d71833f54123da0a7..f7a281998ccddf418bf5799590f51229479e71a5 100644 (file)
@@ -1275,6 +1275,7 @@ only called if a time or frag limit has expired
 */
 void NextLevel()
 {
+       cvar_set("_endmatch", "0");
        game_stopped = true;
        intermission_running = true; // game over
 
@@ -1613,17 +1614,16 @@ void CheckRules_World()
                leadlimit = 0; // no leadlimit for now
        }
 
-       if(timelimit > 0)
-       {
-               timelimit += game_starttime;
-       }
-       else if (timelimit < 0)
+       if (autocvar__endmatch || timelimit < 0)
        {
                // endmatch
                NextLevel();
                return;
        }
 
+       if(timelimit > 0)
+               timelimit += game_starttime;
+
        float wantovertime;
        wantovertime = 0;