From d3c9c34d96efd32428add62faef0eaa871786c03 Mon Sep 17 00:00:00 2001 From: spherallic Date: Fri, 28 Jan 2022 00:45:17 +0100 Subject: [PATCH] Allow record/NiGHTS attack in modified games, without recording replays. --- src/m_menu.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/m_menu.c b/src/m_menu.c index 3c1d8d7ca..e33cdd5bf 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -800,7 +800,7 @@ static menuitem_t SP_TimeAttackMenu[] = {IT_DISABLED, NULL, "Guest Option...", &SP_GuestReplayDef, 100}, {IT_DISABLED, NULL, "Replay...", &SP_ReplayDef, 110}, {IT_DISABLED, NULL, "Ghosts...", &SP_GhostDef, 120}, - {IT_WHITESTRING|IT_CALL|IT_CALL_NOTMODIFIED, NULL, "Start", M_ChooseTimeAttack, 130}, + {IT_WHITESTRING|IT_CALL, NULL, "Start", M_ChooseTimeAttack, 130}, }; enum @@ -899,7 +899,7 @@ static menuitem_t SP_NightsAttackMenu[] = {IT_DISABLED, NULL, "Guest Option...", &SP_NightsGuestReplayDef, 100}, {IT_DISABLED, NULL, "Replay...", &SP_NightsReplayDef, 110}, {IT_DISABLED, NULL, "Ghosts...", &SP_NightsGhostDef, 120}, - {IT_WHITESTRING|IT_CALL|IT_CALL_NOTMODIFIED, NULL, "Start", M_ChooseNightsAttack, 130}, + {IT_WHITESTRING|IT_CALL, NULL, "Start", M_ChooseNightsAttack, 130}, }; enum @@ -9943,7 +9943,8 @@ void M_DrawTimeAttackMenu(void) '\x1D' | V_YELLOWMAP, false); } // Draw press ESC to exit string on main record attack menu - V_DrawString(104-72, 180, V_TRANSLUCENT, M_GetText("Press ESC to exit")); + if (modifiedgame && !savemoddata) + V_DrawThinString(104-72, 192, 0, "\x85WARNING: \x80The game is modified. Replays will not be recorded."); } em = M_GetLevelEmblems(cv_nextmap.value); @@ -10203,7 +10204,8 @@ void M_DrawNightsAttackMenu(void) '\x1D' | V_YELLOWMAP, false); } // Draw press ESC to exit string on main record attack menu - V_DrawString(104-72, 180, V_TRANSLUCENT, M_GetText("Press ESC to exit")); + if (modifiedgame && !savemoddata) + V_DrawThinString(104-72, 192, 0, "\x85WARNING: \x80The game is modified. Replays will not be recorded."); } // Super Sonic @@ -10322,6 +10324,12 @@ static void M_ChooseNightsAttack(INT32 choice) M_ClearMenus(true); modeattacking = ATTACKING_NIGHTS; + if (modifiedgame && !savemoddata) // don't record demos for modified games yet + { + G_DeferedInitNew(false, G_BuildMapName(cv_nextmap.value), (UINT8)(cv_chooseskin.value-1), false, false); + return; + } + I_mkdir(va("%s"PATHSEP"replay", srb2home), 0755); I_mkdir(va("%s"PATHSEP"replay"PATHSEP"%s", srb2home, timeattackfolder), 0755); @@ -10351,6 +10359,12 @@ static void M_ChooseTimeAttack(INT32 choice) M_ClearMenus(true); modeattacking = ATTACKING_RECORD; + if (modifiedgame && !savemoddata) + { + G_DeferedInitNew(false, G_BuildMapName(cv_nextmap.value), (UINT8)(cv_chooseskin.value-1), false, false); + return; + } + I_mkdir(va("%s"PATHSEP"replay", srb2home), 0755); I_mkdir(va("%s"PATHSEP"replay"PATHSEP"%s", srb2home, timeattackfolder), 0755);