From bbc0fa135691a90014487c41b0f9eeab4a09eccc Mon Sep 17 00:00:00 2001 From: Alug Date: Tue, 30 Jun 2026 18:36:56 +0200 Subject: [PATCH] fix map replacement checks for pwads added on startup stuff added per -file or whatever this incorrectly rechecked the iwads again instead of the pwads themselves, which let to the game flagging vanilla maps as replaced, setting the game to be modified --- src/d_main.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/d_main.c b/src/d_main.c index 8d6127cb6..6abc6d681 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -1463,20 +1463,24 @@ static void IdentifyVersion(void) // // search for maps // -static void D_CheckMapReplacements(boolean checkreplaced) +static void D_CheckMapReplacements(boolean pwad) { INT32 i; char *name; UINT16 wadnum; lumpinfo_t *lumpinfo; + size_t numfiles; - for (wadnum = 0; wadnum < mainwads; wadnum++) + wadnum = pwad ? (mainwads+1) : 0; + numfiles = pwad ? numwadfiles : mainwads; + + for (; wadnum < numfiles; wadnum++) { lumpinfo = wadfiles[wadnum]->lumpinfo; for (i = 0; i < wadfiles[wadnum]->numlumps; i++, lumpinfo++) { name = lumpinfo->name; - P_CheckMapReplacements(name, checkreplaced); + P_CheckMapReplacements(name, pwad); } } }