]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/dialog_singleplayer.qc
Fix #2579 "Persistent devastator arena after Level 25" when starting a map with the...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / dialog_singleplayer.qc
index b2ae8c0ba9269752bbeddf82c4beb723d5cf8e70..c490b699c2e0225e3b5492cf429d45cccdee9bf9 100644 (file)
@@ -1,6 +1,6 @@
 #include "dialog_singleplayer.qh"
 
-#include <common/mapinfo.qh>
+#include <common/gamemodes/_mod.qh>
 #include "bigbutton.qh"
 #include "radiobutton.qh"
 #include "textlabel.qh"
@@ -87,6 +87,12 @@ void InstantAction_LoadMap(entity btn, entity dummy)
                s = MapInfo_BSPName_ByID(m);
        }
        while(!fexists(sprintf("maps/%s.waypoints", s)));
+
+       // these commands are also executed when starting a map from Multiplayer / Create
+       // in the menu_loadmap_prepare alias
+       localcmd("disconnect\n");
+       localcmd("g_campaign 0\n");
+
        MapInfo_LoadMap(s, 1);
 
        // configure bots