Merge branch 'terencehill/gotomap_fix' into 'master'
authorLegendaryGuard <rootuser999@gmail.com>
Thu, 21 Jul 2022 14:09:13 +0000 (14:09 +0000)
committerLegendaryGuard <rootuser999@gmail.com>
Thu, 21 Jul 2022 14:09:13 +0000 (14:09 +0000)
Fix #2718 "Online dedicated servers panic when gotomap is called during an intermission"

Closes #2718

See merge request xonotic/xonotic-data.pk3dir!1055

qcsrc/server/intermission.qc

index 98d2ef25b08febaa7805ba1f42e5f7327cb9c0af..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("_endmatch", "1");
+       if (!intermission_running)
+               cvar_set("_endmatch", "1");
        if(mapvote_initialized || alreadychangedlevel)
        {
                if(DoNextMapOverride(0))