From a293c700fbbf3a18f25f08c1837fa4f29e8e360b Mon Sep 17 00:00:00 2001 From: terencehill Date: Fri, 30 Apr 2021 20:12:47 +0200 Subject: [PATCH] Fix #2579 "Persistent devastator arena after Level 25" when starting a map with the "Insta action! (random map with bots)" button --- qcsrc/menu/xonotic/dialog_singleplayer.qc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/qcsrc/menu/xonotic/dialog_singleplayer.qc b/qcsrc/menu/xonotic/dialog_singleplayer.qc index 717fe524b..c490b699c 100644 --- a/qcsrc/menu/xonotic/dialog_singleplayer.qc +++ b/qcsrc/menu/xonotic/dialog_singleplayer.qc @@ -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 -- 2.39.2