]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/intermission.qc
Fix #2718 "Online dedicated servers panic when gotomap is called during an intermission"
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / intermission.qc
index 3bb3bdb8e01b65aa552405537573bfd713ccc97a..c1a5d33d8feec8551c493fa78272fd832b946b62 100644 (file)
@@ -399,7 +399,8 @@ string GotoMap(string m)
        if(!MapInfo_CheckMap(m))
                return "The map you suggested does not support the current game mode.";
        cvar_set("nextmap", m);
-       cvar_set("timelimit", "-1");
+       if (!intermission_running)
+               cvar_set("_endmatch", "1");
        if(mapvote_initialized || alreadychangedlevel)
        {
                if(DoNextMapOverride(0))
@@ -433,9 +434,7 @@ void IntermissionThink(entity this)
                this.autoscreenshot = -1;
                if(IS_REAL_CLIENT(this))
                {
-                       string num = strftime(false, "%s");
-                       if (num == "")
-                               num = strftime_s();
+                       string num = strftime_s(); // strftime(false, "%s") isn't reliable, see strftime_s description
                        stuffcmd(this, sprintf("\nscreenshot screenshots/autoscreenshot/%s-%s.jpg; "
                                "echo \"^5A screenshot has been taken at request of the server.\"\n", GetMapname(), num));
                }