Fix guest data being deleted regardless of choice

This commit is contained in:
Steel Titanium 2020-03-08 00:34:15 -05:00
parent a3f3dd649f
commit e5270ad9c7

View file

@ -10100,9 +10100,12 @@ static void M_ReplayTimeAttack(INT32 choice)
static void M_EraseGuest(INT32 choice)
{
const char *rguest = va("%s"PATHSEP"replay"PATHSEP"%s"PATHSEP"%s-guest.lmp", srb2home, timeattackfolder, G_BuildMapName(cv_nextmap.value));
(void)choice;
if (FIL_FileExists(rguest))
remove(rguest);
if (choice == 'y' || choice == KEY_ENTER)
{
if (FIL_FileExists(rguest))
remove(rguest);
}
M_SetupNextMenu(currentMenu->prevMenu->prevMenu);
Nextmap_OnChange();
M_StartMessage(M_GetText("Guest replay data erased.\n"),NULL,MM_NOTHING);