From c6de3040fb5e2b969105bd7f154f1e80d1c8f034 Mon Sep 17 00:00:00 2001 From: Alug Date: Mon, 30 Sep 2024 16:27:56 +0200 Subject: [PATCH] work around encore music again S_InitMapMusic would play before the level actually started thus playing a smol bit of non encore music in encore --- src/s_sound.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/s_sound.c b/src/s_sound.c index dd1dd814c..122866cc3 100644 --- a/src/s_sound.c +++ b/src/s_sound.c @@ -2059,17 +2059,13 @@ void S_InitMapMusic(void) if (keepmusic) return; - if (cv_skipintromusic.value) - { - S_StopMusic(); - S_ChangeMusicEx(mapmusname, mapmusflags, true, mapmusposition, 0, 0); - return; - } - // Starting ambience should always be restarted // lug: but not when we keep the map music lol S_StopMusic(); + if (cv_skipintromusic.value) + return; + if (leveltime < starttime) // SRB2Kart S_ChangeMusicInternal((encoremode ? "estart" : "kstart"), false); //S_StopMusic(); //S_ChangeMusicEx((encoremode ? "estart" : "kstart"), 0, false, mapmusposition, 0, 0); @@ -2090,6 +2086,8 @@ void S_StartMapMusic(void) if (cv_skipintromusic.value) { + if (leveltime == 0) + S_ChangeMusicEx(mapmusname, mapmusflags, true, mapmusposition, 0, 0); if (leveltime == (starttime + (TICRATE/2))) S_ShowMusicCredit(); return;