M_ReplayTimeAttack: Repair non-netreplay demo playback

TODO: Consistently crashes on successful replay finish
This commit is contained in:
toaster 2023-01-28 22:20:43 +00:00
parent 6b85a755eb
commit 594acca383

View file

@ -289,8 +289,28 @@ void M_HandleStaffReplay(INT32 choice)
void M_ReplayTimeAttack(INT32 choice) void M_ReplayTimeAttack(INT32 choice)
{ {
// @TODO: const char *which;
(void) choice; M_ClearMenus(true);
demo.loadfiles = false; demo.ignorefiles = true; // Just assume that record attack replays have the files needed
switch (choice)
{
default:
case tareplay_besttime:
which = "time-best";
break;
case tareplay_bestlap:
which = "lap-best";
break;
case tareplay_last:
which = "last";
break;
case tareplay_guest:
G_DoPlayDemo(va("%s"PATHSEP"media"PATHSEP"replay"PATHSEP"%s"PATHSEP"%s-guest.lmp", srb2home, timeattackfolder, G_BuildMapName(levellist.choosemap+1)));
return;
}
G_DoPlayDemo(va("%s"PATHSEP"media"PATHSEP"replay"PATHSEP"%s"PATHSEP"%s-%s-%s.lmp", srb2home, timeattackfolder, G_BuildMapName(levellist.choosemap+1), cv_skin[0].string, which));
} }
static const char *TA_GuestReplay_Str = NULL; static const char *TA_GuestReplay_Str = NULL;