From dcd63aece977a24b672b31259c9292c0271f7214 Mon Sep 17 00:00:00 2001 From: toaster Date: Fri, 16 Sep 2022 23:40:42 +0100 Subject: [PATCH] Repair bootmap. We're not even going to use this feature, but it showed up as nonsensical while reviewing, and would take more work to strip out --- src/d_main.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/d_main.c b/src/d_main.c index d74f42378..d4c003a89 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -1709,19 +1709,14 @@ void D_SRB2Main(void) // rei/miru: bootmap (Idea: starts the game on a predefined map) if (bootmap && !(M_CheckParm("-warp") && M_IsNextParm())) { - const INT32 bootMapNum = G_MapNumber(bootmap)+1; + pstartmap = G_MapNumber(bootmap)+1; - if (mapheaderinfo[bootMapNum]) + if (pstartmap == nummapheaders) { - pstartmap = bootMapNum; - - if (pstartmap < 1 || pstartmap > NUMMAPS) - I_Error("Cannot warp to map %d (out of range)\n", pstartmap); - else - { - autostart = true; - } + I_Error("Cannot warp to map %s (not found)\n", bootmap); } + + autostart = true; } if (autostart || netgame)