From 0b2202e5cbc9f1139598e88cd68345bddf6d5000 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gustaf=20Alh=C3=A4ll?= <gustaf@hanicef.me>
Date: Sun, 13 Oct 2024 16:50:41 +0200
Subject: [PATCH] Fix bootmap not resetting properly after reload

---
 src/deh_soc.c  | 2 --
 src/dehacked.c | 1 +
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/deh_soc.c b/src/deh_soc.c
index a2be99fa0e..c0e646f608 100644
--- a/src/deh_soc.c
+++ b/src/deh_soc.c
@@ -3549,8 +3549,6 @@ void readmaincfg(MYFILE *f)
 	char *tmp;
 	INT32 value;
 
-	bootmap = 0; // reset bootmap so we don't warp to the wrong map if another maincfg had set this before
-
 	do
 	{
 		if (myfgets(s, MAXLINELEN, f))
diff --git a/src/dehacked.c b/src/dehacked.c
index 8743a482ed..505c7ed1f1 100644
--- a/src/dehacked.c
+++ b/src/dehacked.c
@@ -196,6 +196,7 @@ static void DEH_LoadDehackedFile(MYFILE *f, boolean mainfile)
 
 	deh_num_warning = 0;
 
+	bootmap = 0;
 	gamedataadded = titlechanged = introchanged = false;
 
 	// it doesn't test the version of SRB2 and version of dehacked file
-- 
GitLab