Skip to content

Commit

Permalink
For demos that don't end in death, don't read past demo data.
Browse files Browse the repository at this point in the history
  • Loading branch information
SSNTails committed Jun 11, 2024
1 parent 42729ee commit 6a5ffe6
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions d_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,10 @@ int MiniLoop ( void (*start)(void), void (*stop)(void)
*demo_p++ = buttons;

if ((demorecording || demoplayback) && (buttons & BT_PAUSE) )
exit = ga_completed;
{
exit = ga_exitdemo; // Demo finished by choice, not by death
break;
}

if (gameaction == ga_warped || gameaction == ga_startnew)
{
Expand Down Expand Up @@ -830,8 +833,6 @@ int RunDemo (char *demoname)
void RunMenu (void)
{
#ifdef MARS
int exit = ga_exitdemo;

M_Start();
if (!gameinfo.noAttractDemo) {
do {
Expand All @@ -847,11 +848,9 @@ void RunMenu (void)
if (lump == -1)
break;

exit = RunDemo(demo);
if (exit == ga_exitdemo)
break;
RunDemo(demo);
}
} while (exit != ga_exitdemo);
} while (true);
}
M_Stop();
#else
Expand Down

0 comments on commit 6a5ffe6

Please sign in to comment.