From 2385913d9d494d2a3ed13c1ca414879088ba2656 Mon Sep 17 00:00:00 2001 From: SteelT Date: Tue, 5 Mar 2024 00:23:06 -0500 Subject: [PATCH 1/2] Reset gamemap when returning to menus so that g_reloadingMap isn't true when picking the same map again from match race --- src/d_main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/d_main.cpp b/src/d_main.cpp index 1ece00a2b..cc516811e 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -1085,6 +1085,7 @@ void D_ClearState(void) nextmapoverride = 0; skipstats = 0; tutorialchallenge = TUTORIALSKIP_NONE; + gamemap = 1; gameaction = ga_nothing; memset(displayplayers, 0, sizeof(displayplayers)); From abc48d7546fc735e573e465b38f56fb42a23ecb0 Mon Sep 17 00:00:00 2001 From: toaster Date: Wed, 6 Mar 2024 20:09:34 +0000 Subject: [PATCH 2/2] Invert behaviour in modeattacking --- src/p_setup.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/p_setup.cpp b/src/p_setup.cpp index f73355636..249a6a9be 100644 --- a/src/p_setup.cpp +++ b/src/p_setup.cpp @@ -8210,12 +8210,17 @@ void P_ResetLevelMusic(void) if (tempmapmus_size > 1) { - if (g_reloadingMap) + if (g_reloadingMap == (modeattacking == ATTACKING_NONE)) { // If restarting the map, simply cycle // through available alt music. idx = (mapmusrng + 1) % tempmapmus_size; } + else if (modeattacking) + { + // Short circuit the cycle. + idx = mapmusrng % tempmapmus_size; + } else { idx = random % tempmapmus_size;