diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 72d020c22a3be45b94c15fb6dd22f74de47f16fd..f81a6abde0a7e30dff0b0c69c2a05484fde2b223 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -1905,7 +1905,7 @@ static void Command_Map_f(void) return; } - option_force = COM_CheckPartialParm("-f"); + option_force = COM_CheckPartialParm("-f") || (cv_debug || devparm); option_gametype = COM_CheckPartialParm("-g"); newresetplayers = ! COM_CheckParm("-noresetplayers"); @@ -1913,7 +1913,8 @@ static void Command_Map_f(void) !( netgame || multiplayer ) && !( usedCheats ); - if (wouldSetCheats && !option_force) + if (wouldSetCheats && !option_force + && !M_SecretUnlocked(SECRET_LEVELSELECT, serverGamedata)) { /* May want to be more descriptive? */ CONS_Printf(M_GetText("Sorry, level change disabled in single player.\n")); @@ -1967,7 +1968,7 @@ static void Command_Map_f(void) return; } - if (wouldSetCheats && option_force) + if (wouldSetCheats) { G_SetUsedCheats(false); } diff --git a/src/m_cond.c b/src/m_cond.c index b21778c697042c4b96fed6126447df803121b077..86bae4933137df3e633950038f19603d121db03b 100644 --- a/src/m_cond.c +++ b/src/m_cond.c @@ -467,7 +467,8 @@ UINT8 M_SecretUnlocked(INT32 type, gamedata_t *data) UINT8 M_MapLocked(INT32 mapnum, gamedata_t *data) { - if (!mapheaderinfo[mapnum-1] || mapheaderinfo[mapnum-1]->unlockrequired < 0) + if (!mapheaderinfo[mapnum-1] || mapheaderinfo[mapnum-1]->unlockrequired < 0 + || cv_debug || devparm) { return false; } diff --git a/src/m_menu.c b/src/m_menu.c index 12003f945c8ec9d9c73a15a6ef833f1549c4970f..7618a2c4afe3cb72efab63e51acac50a922d3f09 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -3673,9 +3673,12 @@ void M_StartControlPanel(void) } else if (!(netgame || multiplayer)) // Single Player { + // Devmode unlocks Pandora's Box in the pause menu + boolean pandora = ((M_SecretUnlocked(SECRET_PANDORA, serverGamedata) || cv_debug || devparm) && !marathonmode); + if (gamestate != GS_LEVEL || ultimatemode) // intermission, so gray out stuff. { - SPauseMenu[spause_pandora].status = (M_SecretUnlocked(SECRET_PANDORA, serverGamedata)) ? (IT_GRAYEDOUT) : (IT_DISABLED); + SPauseMenu[spause_pandora].status = (pandora) ? (IT_GRAYEDOUT) : (IT_DISABLED); SPauseMenu[spause_retry].status = IT_GRAYEDOUT; } else @@ -3684,7 +3687,7 @@ void M_StartControlPanel(void) if (players[consoleplayer].playerstate != PST_LIVE) ++numlives; - SPauseMenu[spause_pandora].status = (M_SecretUnlocked(SECRET_PANDORA, serverGamedata) && !marathonmode) ? (IT_STRING | IT_CALL) : (IT_DISABLED); + SPauseMenu[spause_pandora].status = (pandora) ? (IT_STRING | IT_CALL) : (IT_DISABLED); // The list of things that can disable retrying is (was?) a little too complex // for me to want to use the short if statement syntax @@ -3695,7 +3698,11 @@ void M_StartControlPanel(void) } // We can always use level select though. :33 - SPauseMenu[spause_levelselect].status = (maplistoption != 0) ? (IT_STRING | IT_CALL) : (IT_DISABLED); + // Guarantee it if we have either it unlocked or devmode is enabled + if ((maplistoption != 0 || M_SecretUnlocked(SECRET_LEVELSELECT, serverGamedata) || cv_debug || devparm) && !marathonmode) + SPauseMenu[spause_levelselect].status = (IT_STRING | IT_CALL); + else + SPauseMenu[spause_levelselect].status = (IT_DISABLED); // And emblem hints. SPauseMenu[spause_hints].status = (M_SecretUnlocked(SECRET_EMBLEMHINTS, clientGamedata) && !marathonmode) ? (IT_STRING | IT_CALL) : (IT_DISABLED); @@ -5091,7 +5098,8 @@ static boolean M_CanShowLevelOnPlatter(INT32 mapnum, INT32 gt) return false; case LLM_LEVELSELECT: - if (!(mapheaderinfo[mapnum]->levelselect & maplistoption)) + if (!(mapheaderinfo[mapnum]->levelselect & maplistoption) + && !(cv_debug || devparm)) //Allow ALL levels in devmode! return false; return true; @@ -7655,9 +7663,12 @@ static void M_PauseLevelSelect(INT32 choice) SP_PauseLevelSelectDef.prevMenu = currentMenu; levellistmode = LLM_LEVELSELECT; - // maplistoption is NOT specified, so that this + // maplistoption is only specified if not set already + // and we have the level select unlocked so that it // transfers the level select list from the menu // used to enter the game to the pause menu. + if (maplistoption == 0 && M_SecretUnlocked(SECRET_LEVELSELECT, serverGamedata)) + maplistoption = 1; if (!M_PrepareLevelPlatter(-1, true)) {