mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-22 10:02:01 +00:00
Okay do this correctly by doing a reacharound to grab the actual sfx id
This commit is contained in:
parent
045d3bf91d
commit
6fa37c08a0
2 changed files with 22 additions and 5 deletions
23
src/p_user.c
23
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;
|
||||
|
|
|
|||
|
|
@ -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…
Add table
Reference in a new issue