From 1dc83a0c3c65964abca3d60471b2ee678a624a70 Mon Sep 17 00:00:00 2001 From: Alug Date: Tue, 1 Oct 2024 16:02:39 +0200 Subject: [PATCH] dumb special case for wandering balls Zzz... --- src/p_spec.c | 2 +- src/s_sound.c | 7 +++++-- src/s_sound.h | 1 + 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/p_spec.c b/src/p_spec.c index f96c3a726..61ddd7ebb 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -2221,7 +2221,7 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec) INT32 sfxnum; //dont play any funky sound intros that may interfere with the music - if (cv_skipintromusic.value && (leveltime < MUSICSTARTTIME)) + if (skipintromus && (leveltime < MUSICSTARTTIME)) return; sfxnum = sides[line->sidenum[0]].toptexture; //P_AproxDistance(line->dx, line->dy)>>FRACBITS; diff --git a/src/s_sound.c b/src/s_sound.c index 26062fb24..55f044080 100644 --- a/src/s_sound.c +++ b/src/s_sound.c @@ -1988,6 +1988,7 @@ boolean S_FadeOutStopMusic(UINT32 ms) static INT16 oldmap = 0; static boolean oldencore = 0; static boolean skipmusic = false; +boolean skipintromus = false; static const char *musicexception_list[16] = { "vote", "voteea", "voteeb", "racent", "krwin", @@ -2040,6 +2041,8 @@ void S_CheckMap(void) // void S_InitMapMusic(void) { + skipintromus = cv_skipintromusic.value && stricmp(G_BuildMapTitle(gamemap), "Wandering Falls") != 0; + if (mapmusflags & MUSIC_RELOADRESET) { strncpy(mapmusname, mapheaderinfo[gamemap-1]->musname, 7); @@ -2056,7 +2059,7 @@ void S_InitMapMusic(void) // lug: but not when we keep the map music lol S_StopMusic(); - if (cv_skipintromusic.value) + if (skipintromus) return; if (leveltime < MUSICSTARTTIME) // SRB2Kart @@ -2073,7 +2076,7 @@ void S_StartMapMusic(void) if (keepmusic) return; - if (cv_skipintromusic.value) + if (skipintromus) { if (leveltime < starttime) // dumb but i dont need this to be spammed honestly S_ChangeMusicEx(mapmusname, mapmusflags, true, mapmusposition, 0, 0); diff --git a/src/s_sound.h b/src/s_sound.h index 859df4786..4231d9634 100644 --- a/src/s_sound.h +++ b/src/s_sound.h @@ -71,6 +71,7 @@ extern consvar_t cv_keepmusic; extern consvar_t cv_skipintromusic; extern consvar_t cv_ignoremusicchanges; extern boolean keepmusic; +extern boolean skipintromus; #define MUSICSTARTTIME (starttime + (TICRATE/2)) extern consvar_t precachesound;