From 3ee8ffe857977b97ca663e76500b62d2144b15a1 Mon Sep 17 00:00:00 2001 From: Alug Date: Mon, 1 Dec 2025 21:03:18 +0100 Subject: [PATCH] replays: always check if map is loaded not just in old 1.0 replays cause like, otherwise it will just I_Error which is worse lol like this we just get thrown back to titlescreen --- src/g_demo.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/g_demo.c b/src/g_demo.c index 7cc8c4c77..ff7939c77 100644 --- a/src/g_demo.c +++ b/src/g_demo.c @@ -2785,6 +2785,16 @@ void G_DoPlayDemo(char *defdemoname) #endif demobuf.p += 4; // Extrainfo location + // ...*map* not loaded? + if (!gamemap || (gamemap > NUMMAPS) || !mapheaderinfo[gamemap-1] || !(mapheaderinfo[gamemap-1]->menuflags & LF2_EXISTSHACK)) + { + snprintf(msg, 1024, M_GetText("%s features a course that is not currently loaded.\n"), pdemoname); + CONS_Alert(CONS_ERROR, "%s", msg); + M_StartMessage(msg, M_ReturnToTitleFromError, MM_EVENTHANDLER); + G_ResetDemoPlayback(); + return; + } + #ifdef DEMO_COMPAT_100 if (demo.version == 0x0001) { @@ -2817,16 +2827,6 @@ void G_DoPlayDemo(char *defdemoname) return; } - // ...*map* not loaded? - if (!gamemap || (gamemap > NUMMAPS) || !mapheaderinfo[gamemap-1] || !(mapheaderinfo[gamemap-1]->menuflags & LF2_EXISTSHACK)) - { - snprintf(msg, 1024, M_GetText("%s features a course that is not currently loaded.\n"), pdemoname); - CONS_Alert(CONS_ERROR, "%s", msg); - M_StartMessage(msg, M_ReturnToTitleFromError, MM_EVENTHANDLER); - G_ResetDemoPlayback(); - return; - } - // Set color for (i = 0; i < MAXSKINCOLORS; i++) {