]> 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 dc39346aa61f962f323964e81b05eccec083dc4f..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
@@ -128,8 +134,8 @@ void XonoticSingleplayerDialog_fill(entity me)
        me.gotoRC(me, me.rows - 2, 0);
                me.TD(me, 1, 2, e = makeXonoticTextLabel(0.5, _("Campaign Difficulty:")));
                me.TD(me, 1, 1, e = makeXonoticRadioButton(1, "g_campaign_skill", "-2", ZCTX(_("CSKL^Easy"))));
-               me.TD(me, 1, 1, e = makeXonoticRadioButton(1, "g_campaign_skill", "-1", ZCTX(_("CSKL^Medium"))));
-               me.TD(me, 1, 1, e = makeXonoticRadioButton(1, "g_campaign_skill", "0", ZCTX(_("CSKL^Hard"))));
+               me.TD(me, 1, 1, e = makeXonoticRadioButton(1, "g_campaign_skill", "0", ZCTX(_("CSKL^Medium"))));
+               me.TD(me, 1, 1, e = makeXonoticRadioButton(1, "g_campaign_skill", "2", ZCTX(_("CSKL^Hard"))));
                me.TR(me);
                me.TD(me, 1, me.columns, e = makeXonoticButton(_("Start Singleplayer!"), '0 0 0'));
                        e.onClick = CampaignList_LoadMap;