mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-02-24 04:41:31 +00:00
Okay do this correctly by doing a reacharound to grab the actual sfx id
This commit is contained in:
parent
f907a3c215
commit
6317ae5996
2 changed files with 22 additions and 5 deletions
17
src/p_user.c
17
src/p_user.c
|
@ -1729,12 +1729,29 @@ void P_DoPlayerExit(player_t *player)
|
|||
countdown = cv_countdowntime.value*TICRATE + 1; // Use cv_countdowntime
|
||||
|
||||
if (cv_kartvoices.value && P_IsLocalPlayer(player))
|
||||
{
|
||||
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
|
||||
{
|
||||
if (K_IsPlayerLosing(player))
|
||||
S_StartSound(player->mo, sfx_klose);
|
||||
else
|
||||
S_StartSound(player->mo, sfx_kwin);
|
||||
}
|
||||
}
|
||||
|
||||
player->exiting = 3*TICRATE;
|
||||
|
||||
|
|
|
@ -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},
|
||||
|
|
Loading…
Reference in a new issue