From 61893c613c2fbf90fa246fc0419fcb3481debe77 Mon Sep 17 00:00:00 2001 From: fickleheart Date: Sun, 3 Mar 2019 20:41:20 -0600 Subject: [PATCH] Maintain compat for record attack replays --- src/g_game.c | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/src/g_game.c b/src/g_game.c index d1252d58..10774621 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -6031,7 +6031,10 @@ void G_BeginRecording(void) demoflags |= gametype<important) + if (demoflags & DF_FILELIST) { - nameonly(( filename = va("%s", wadfiles[i]->filename) )); - WRITESTRINGN(demo_p, filename, 64); - WRITEMEM(demo_p, wadfiles[i]->md5sum, 16); + // file list + m = demo_p;/* file count */ + demo_p += 1; - totalfiles++; + totalfiles = 0; + for (i = mainwads; ++i < numwadfiles; ) + if (wadfiles[i]->important) + { + nameonly(( filename = va("%s", wadfiles[i]->filename) )); + WRITESTRINGN(demo_p, filename, 64); + WRITEMEM(demo_p, wadfiles[i]->md5sum, 16); + + totalfiles++; + } + + WRITEUINT8(m, totalfiles); } - WRITEUINT8(m, totalfiles); - switch ((demoflags & DF_ATTACKMASK)>>DF_ATTACKSHIFT) { case ATTACKING_NONE: // 0