]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/menu/voret/dialog_singleplayer.c
Actually, set the gametype in the .instantaction file
[voretournament/voretournament.git] / data / qcsrc / menu / voret / dialog_singleplayer.c
index c69854efc55b4af2a12304e704e29dcdded24d5b..867b09c8913401e951f5be35a8f4599598dfce85 100644 (file)
@@ -31,11 +31,12 @@ void InstantAction_LoadMap(entity btn, entity dummy)
                {\r
                        fclose(fh);\r
                        localcmd("\nmenu_loadmap_prepare\n");\r
-                       MapInfo_SwitchGameType(MAPINFO_TYPE_DEATHMATCH);\r
                        MapInfo_LoadMap(argv(1));\r
                        cvar_set("lastlevel", "1");\r
                        return;\r
                }\r
+               else if(argv(0) == "gametype")\r
+                       MapInfo_SwitchGameType(MapInfo_Type_FromString(argv(1)));\r
                else if(argv(0) != "" && argv(0) != "//" && argv(0) != "#")\r
                        cvar_set(argv(0), argv(1)); //TODO: sanity check, this can currently set any cvar!\r
        }\r