From 4cd76db2976cf5cb536e48a0eb8564c90f5f233d Mon Sep 17 00:00:00 2001 From: NepDisk <16447892+NepDisk@users.noreply.github.com> Date: Mon, 21 Oct 2024 23:14:22 -0400 Subject: [PATCH] Fix encore music replacing start music --- src/p_tick.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/p_tick.c b/src/p_tick.c index fa0dab85e..4dac2a099 100644 --- a/src/p_tick.c +++ b/src/p_tick.c @@ -782,11 +782,17 @@ void P_Ticker(boolean run) S_StartSound(NULL, sfx_s3kad); // GO! } } - if (leveltime == (starttime + (TICRATE/2))) + + if (leveltime < starttime) // SRB2Kart + S_ChangeMusicInternal((encoremode ? "estart" : "kstart"), false); // yes this will be spammed otherwise encore and some stuff WILL overwrite it + else if (leveltime == starttime) // The GO! sound stops the level start ambience + S_StopMusic(); + else if (leveltime == starttime + (TICRATE/2)) // Plays the music after the starting countdown. { S_ChangeMusicEx(mapmusname, mapmusflags, true, mapmusposition, 0, 0); S_ShowMusicCredit(); } + } ps_lua_thinkframe_time = I_GetPreciseTime();