Skip to content

Commit

Permalink
Heretic: draw demo bar in -timedemo runs
Browse files Browse the repository at this point in the history
  • Loading branch information
JNechaevsky committed Jun 8, 2023
1 parent c38d01f commit 54fe6b0
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/heretic/g_game.c
Original file line number Diff line number Diff line change
Expand Up @@ -2271,10 +2271,22 @@ void G_TimeDemo(char *name)
{
skill_t skill;
int episode, map, i;
int lumpnum, lumplength; // [crispy]

nodrawers = M_CheckParm ("-nodraw");

demobuffer = demo_p = W_CacheLumpName(name, PU_STATIC);

// [crispy] ignore empty demo lumps
lumpnum = W_GetNumForName(name);
lumplength = W_LumpLength(lumpnum);
if (lumplength < 0xd)
{
demoplayback = true;
G_CheckDemoStatus();
return;
}

skill = *demo_p++;
episode = *demo_p++;
map = *demo_p++;
Expand Down Expand Up @@ -2309,6 +2321,9 @@ void G_TimeDemo(char *name)
{
netdemo = true;
}

// [crispy] demo progress bar
G_DemoProgressBar(lumplength);
}


Expand Down

0 comments on commit 54fe6b0

Please sign in to comment.