From f89e6950c39ff469570ac608bfc91c05efee1874 Mon Sep 17 00:00:00 2001 From: drfrag Date: Thu, 29 Jul 2021 09:47:04 +0200 Subject: [PATCH] - Make changemap use + for next and +$ for nextsecret maps. --- src/console/c_cmds.cpp | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/src/console/c_cmds.cpp b/src/console/c_cmds.cpp index 9da63779a3..220b889ec4 100644 --- a/src/console/c_cmds.cpp +++ b/src/console/c_cmds.cpp @@ -361,24 +361,17 @@ CCMD (changemap) if (argv.argc() > 1) { const char *mapname = argv[1]; - if (!strcmp(mapname, "*")) mapname = primaryLevel->MapName.GetChars(); - - if (strstr(mapname, "next") && !P_CheckMapData(mapname)) + if (!strcmp(mapname, "*")) { - if (!strcmp(mapname, "next")) - { - if (primaryLevel->NextMap.Len() > 0 && primaryLevel->NextMap.Compare("enDSeQ", 6)) - { - mapname = primaryLevel->NextMap.GetChars(); - } - } - else if (!strcmp(mapname, "nextsecret")) - { - if (primaryLevel->NextSecretMap.Len() > 0 && primaryLevel->NextSecretMap.Compare("enDSeQ", 6)) - { - mapname = primaryLevel->NextSecretMap.GetChars(); - } - } + mapname = primaryLevel->MapName.GetChars(); + } + else if (!strcmp(mapname, "+") && primaryLevel->NextMap.Len() > 0 && primaryLevel->NextMap.Compare("enDSeQ", 6)) + { + mapname = primaryLevel->NextMap.GetChars(); + } + else if (!strcmp(mapname, "+$") && primaryLevel->NextSecretMap.Len() > 0 && primaryLevel->NextSecretMap.Compare("enDSeQ", 6)) + { + mapname = primaryLevel->NextSecretMap.GetChars(); } try