Allow record/NiGHTS attack in modified games, without recording replays.

This commit is contained in:
spherallic 2022-01-28 00:45:17 +01:00
parent 93512ae9f9
commit d3c9c34d96

View file

@ -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);