From 6317ae59962a7baefafc200970ac7bf858e8ea6e Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Fri, 7 Sep 2018 16:56:34 -0400 Subject: [PATCH] Okay do this correctly by doing a reacharound to grab the actual sfx id --- src/p_user.c | 23 ++++++++++++++++++++--- src/sounds.c | 4 ++-- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/src/p_user.c b/src/p_user.c index 4600ca12..240d0aee 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -1730,10 +1730,27 @@ void P_DoPlayerExit(player_t *player) if (cv_kartvoices.value && P_IsLocalPlayer(player)) { - if (K_IsPlayerLosing(player)) - S_StartSound(player->mo, sfx_klose); + if (P_IsLocalPlayer(player)) + { + sfxenum_t sfx_id; + if (K_IsPlayerLosing(player)) + { + sfx_id = ((skin_t *)player->mo->skin)->soundsid[S_sfx[sfx_klose].skinsound]; + S_StartSound(NULL, sfx_id); + } + else + { + sfx_id = ((skin_t *)player->mo->skin)->soundsid[S_sfx[sfx_kwin].skinsound]; + S_StartSound(NULL, sfx_id); + } + } else - S_StartSound(player->mo, sfx_kwin); + { + if (K_IsPlayerLosing(player)) + S_StartSound(player->mo, sfx_klose); + else + S_StartSound(player->mo, sfx_kwin); + } } player->exiting = 3*TICRATE; diff --git a/src/sounds.c b/src/sounds.c index a672694d..2f772a69 100644 --- a/src/sounds.c +++ b/src/sounds.c @@ -814,8 +814,8 @@ sfxinfo_t S_sfx[NUMSFX] = {"dbgsal", false, 110, 8, -1, NULL, 0, -1, -1, LUMPERROR}, // SRB2kart - Skin sounds - {"kwin", false, 64, 48, -1, NULL, 0, SKSKWIN, -1, LUMPERROR}, - {"klose", false, 64, 48, -1, NULL, 0, SKSKLOSE, -1, LUMPERROR}, + {"kwin", false, 64, 96, -1, NULL, 0, SKSKWIN, -1, LUMPERROR}, + {"klose", false, 64, 96, -1, NULL, 0, SKSKLOSE, -1, LUMPERROR}, {"khurt1", false, 64, 96, -1, NULL, 0, SKSKPAN1, -1, LUMPERROR}, {"khurt2", false, 64, 96, -1, NULL, 0, SKSKPAN2, -1, LUMPERROR}, {"kattk1", false, 64, 96, -1, NULL, 0, SKSKATK1, -1, LUMPERROR},