g_game.c: Don't overwrite Heretic/Hexen demo playback arguments

-nomonsters and -respawn need to be read for vanilla demo playback: this
fix allows either command line or special bits to enable them.

Fix for #803
This commit is contained in:
Thomas A. Birkel 2016-11-10 23:44:06 -05:00
parent 406a15b840
commit 621a8d8362
2 changed files with 10 additions and 6 deletions

View file

@ -1885,9 +1885,11 @@ void G_DoPlayDemo(void)
map = *demo_p++;
// Read special parameter bits: see G_RecordDemo() for details.
respawnparm = (*demo_p & DEMOHEADER_RESPAWN) != 0;
longtics = (*demo_p & DEMOHEADER_LONGTICS) != 0;
nomonsters = (*demo_p & DEMOHEADER_NOMONSTERS) != 0;
longtics = (*demo_p & DEMOHEADER_LONGTICS) != 0;
// don't overwrite arguments from the command line
respawnparm |= (*demo_p & DEMOHEADER_RESPAWN) != 0;
nomonsters |= (*demo_p & DEMOHEADER_NOMONSTERS) != 0;
for (i = 0; i < MAXPLAYERS; i++)
playeringame[i] = (*demo_p++) != 0;

View file

@ -2049,9 +2049,11 @@ void G_DoPlayDemo(void)
map = *demo_p++;
// Read special parameter bits: see G_RecordDemo() for details.
respawnparm = (*demo_p & DEMOHEADER_RESPAWN) != 0;
longtics = (*demo_p & DEMOHEADER_LONGTICS) != 0;
nomonsters = (*demo_p & DEMOHEADER_NOMONSTERS) != 0;
longtics = (*demo_p & DEMOHEADER_LONGTICS) != 0;
// don't overwrite arguments from the command line
respawnparm |= (*demo_p & DEMOHEADER_RESPAWN) != 0;
nomonsters |= (*demo_p & DEMOHEADER_NOMONSTERS) != 0;
for (i = 0; i < maxplayers; i++)
{