From 090559a7661dbb33fe05945b536e17adcfe5deab Mon Sep 17 00:00:00 2001 From: Alug Date: Thu, 3 Jul 2025 00:34:19 +0200 Subject: [PATCH] move this out of maptitle condition it does not rely on it and may even fail idk why i threw it in there --- src/s_sound.c | 17 +++++++++-------- src/sounds.c | 1 + 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/s_sound.c b/src/s_sound.c index 45da91a27..b3027c012 100644 --- a/src/s_sound.c +++ b/src/s_sound.c @@ -2030,7 +2030,7 @@ void S_KeepMusic(void) } // Sets up the map music in case it should be reloaded -// Special case for keep music +// Special case for keepmusic void S_HandleReloadResetMusic(void) { if (!(mapmusic.flags & MUSIC_RELOADRESET)) @@ -2055,23 +2055,24 @@ void S_HandleReloadResetMusic(void) static boolean S_SkipIntroMusic(void) { - boolean skip = cv_skipintromusic.value; + if (!cv_skipintromusic.value) + return false; - if (!skip) + // check if menu music is playing, otherwise it may continue playing + if (!stricmp(music.name, "titles")) return false; char *maptitle = G_BuildMapTitle(gamemap); // Zzz... - if (maptitle) + if (maptitle && !stricmp(maptitle, "Wandering Falls")) // wandering balls changes its song when the race starts Zzz... { - // check if menu music is playing, otherwise it may continue playing - if (!stricmp(music.name, "titles") || (maptitle && (!stricmp(maptitle, "Wandering Falls")))) // wandering balls changes its song when the race starts Zzz... - skip = false; + Z_Free(maptitle); + return false; } Z_Free(maptitle); - return skip; + return true; } // diff --git a/src/sounds.c b/src/sounds.c index c3d92c853..bdfc19b86 100644 --- a/src/sounds.c +++ b/src/sounds.c @@ -1037,6 +1037,7 @@ sfxenum_t S_AddSoundFx(const char *name, boolean singular, INT32 flags, boolean S_sfx[i].data = I_GetSfx(&S_sfx[i]); else S_sfx[i].data = NULL; + return i; } }