Restore the detection of finished demos on the title screen

This commit is contained in:
Lephenixnoir 2021-09-16 14:10:30 +02:00
parent 6512fba2d2
commit 35708ebc59
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
1 changed files with 18 additions and 2 deletions

View File

@ -1146,8 +1146,8 @@ void G_DoPlayDemo (void)
gameaction = ga_nothing;
demobuffer = demo_p = (byte *)W_CacheLumpNameConst (defdemoname, PU_STATIC);
/* CGDoom: We have old WADs with demos at versions 108 and 109. They don't
really work whell though */
/* CGDoom: We have old WADs with demos at versions 108 and 109. The decoding
work similarly, it's probably enemy position/AI that mess up */
byte version = *demo_p++;
if (version != VERSION && version != 109 && version != 108)
{
@ -1218,6 +1218,22 @@ boolean G_CheckDemoStatus (void)
, endtime-starttime);
}
if (demoplayback)
{
Z_ChangeTag (demobuffer, PU_CACHE);
demoplayback = false;
netdemo = false;
netgame = false;
deathmatch = false;
playeringame[1] = playeringame[2] = playeringame[3] = 0;
respawnparm = false;
fastparm = false;
nomonsters = false;
consoleplayer = 0;
D_AdvanceDemo ();
return true;
}
return false;
}