From: terencehill Date: Fri, 30 Apr 2021 18:12:47 +0000 (+0200) Subject: Fix #2579 "Persistent devastator arena after Level 25" when starting a map with the... X-Git-Tag: xonotic-v0.8.5~426 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a293c700fbbf3a18f25f08c1837fa4f29e8e360b;p=xonotic%2Fxonotic-data.pk3dir.git Fix #2579 "Persistent devastator arena after Level 25" when starting a map with the "Insta action! (random map with bots)" button --- 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