From 4b089feb9bf5145a420071c6094aa539812e4b75 Mon Sep 17 00:00:00 2001 From: Brad Harding Date: Sun, 10 Nov 2024 13:48:12 +1100 Subject: [PATCH] Fix resetting `episode`, `expansion` CVARs at startup --- src/d_main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/d_main.c b/src/d_main.c index a0a9cdace..e6c2f9fe2 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -2849,8 +2849,10 @@ static void D_DoomMainSetup(void) #if defined(_WIN32) if (wad && previouswad && !M_StringCompare(wad, previouswad)) { - EpiDef.laston = episode = episode_default; - ExpDef.laston = expansion = expansion_default; + episode = episode_default; + EpiDef.laston = episode - 1; + expansion = expansion_default; + ExpDef.laston = expansion - 1; M_SaveCVARs(); } #endif