ref: 02fd3562669d8a2813f22d977b81bbb23db11739
parent: dc4eb0ba8d0bac8059c060b5965db13f5c86dd12
parent: 089ab59dff793780c3c9f4963b7c62bce0d6a9b4
author: Simon Howard <[email protected]>
date: Sun Nov 20 16:50:12 EST 2016
Merge pull request #812 from CapnClever/raven-demoplayback-args g_game.c: Don't overwrite Heretic/Hexen timedemo arguments
--- a/src/heretic/g_game.c
+++ b/src/heretic/g_game.c
@@ -1921,9 +1921,11 @@
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++)
{
--- a/src/hexen/g_game.c
+++ b/src/hexen/g_game.c
@@ -2091,9 +2091,11 @@
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++)
{