From f749424de76eee886f3f55b030c4745b260f63fa Mon Sep 17 00:00:00 2001 From: James R Date: Mon, 14 Feb 2022 15:04:30 -0800 Subject: [PATCH] Turn kstart into sfx --- src/p_user.c | 7 ++++++- src/s_sound.c | 7 ++++++- src/sounds.c | 1 + src/sounds.h | 1 + 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/p_user.c b/src/p_user.c index 1e1269751..e65eb6fb2 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -805,7 +805,12 @@ void P_RestoreMusic(player_t *player) // Event - Level Start if (leveltime < (starttime + (TICRATE/2))) - S_ChangeMusicInternal((encoremode ? "estart" : "kstart"), false); //S_StopMusic(); + { + if (encoremode) + S_ChangeMusicInternal("estart", false); //S_StopMusic(); + else + S_StartSound(NULL, sfx_kstart); + } else // see also where time overs are handled - search for "lives = 2" in this file { INT32 wantedmus = 0; // 0 is level music, 1 is invincibility, 2 is grow diff --git a/src/s_sound.c b/src/s_sound.c index ac66a5777..3e416a883 100644 --- a/src/s_sound.c +++ b/src/s_sound.c @@ -2351,7 +2351,12 @@ void S_StartEx(boolean reset) S_StopMusic(); // Starting ambience should always be restarted, if playing. if (leveltime < (starttime + (TICRATE/2))) // SRB2Kart - S_ChangeMusicEx((encoremode ? "estart" : "kstart"), 0, false, mapmusposition, 0, 0); + { + if (encoremode) + S_ChangeMusicEx("estart", 0, false, mapmusposition, 0, 0); + else + S_StartSound(NULL, sfx_kstart); + } else S_ChangeMusicEx(mapmusname, mapmusflags, true, mapmusposition, 0, 0); diff --git a/src/sounds.c b/src/sounds.c index e9a13da77..58e8f2afe 100644 --- a/src/sounds.c +++ b/src/sounds.c @@ -1099,6 +1099,7 @@ sfxinfo_t S_sfx[NUMSFX] = {"dbgsal", false, 255, 8, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Debug notification {"cock", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Hammer cocks, bang bang {"itcaps", false, 64, 16, -1, NULL, 0, -1, -1, LUMPERROR, "Item capsule"}, + {"kstart", false, 64, 16, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Sonic Adventure shwing! // SRB2Kart - Engine sounds // Engine class A diff --git a/src/sounds.h b/src/sounds.h index 9abf99117..4093fec7b 100644 --- a/src/sounds.h +++ b/src/sounds.h @@ -1163,6 +1163,7 @@ typedef enum sfx_dbgsal, sfx_cock, sfx_itcaps, + sfx_kstart, // Next up: UNIQUE ENGINE SOUNDS! Hoooooo boy... // Engine class A - Low Speed, Low Weight