mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-04-04 17:37:46 +00:00
Only play one player's roulette sounds at a time
Don't stack the sounds :WutFace:
This commit is contained in:
parent
527642323e
commit
d2ec4d2be5
1 changed files with 29 additions and 1 deletions
30
src/k_kart.c
30
src/k_kart.c
|
@ -904,7 +904,35 @@ static void K_KartItemRoulette(player_t *player, ticcmd_t *cmd)
|
|||
|
||||
// This makes the roulette produce the random noises.
|
||||
if ((player->kartstuff[k_itemroulette] % 3) == 1 && P_IsLocalPlayer(player))
|
||||
S_StartSound(NULL, sfx_mkitm1 + ((player->kartstuff[k_itemroulette] / 3) % 8));
|
||||
{
|
||||
#define PLAYROULETTESND S_StartSound(NULL, sfx_mkitm1 + ((player->kartstuff[k_itemroulette] / 3) % 8));
|
||||
if (splitscreen)
|
||||
{
|
||||
if (players[displayplayer].kartstuff[k_itemroulette])
|
||||
{
|
||||
if (player == &players[displayplayer])
|
||||
PLAYROULETTESND;
|
||||
}
|
||||
else if (players[secondarydisplayplayer].kartstuff[k_itemroulette])
|
||||
{
|
||||
if (player == &players[secondarydisplayplayer])
|
||||
PLAYROULETTESND;
|
||||
}
|
||||
else if (players[thirddisplayplayer].kartstuff[k_itemroulette])
|
||||
{
|
||||
if (player == &players[thirddisplayplayer])
|
||||
PLAYROULETTESND;
|
||||
}
|
||||
else if (players[fourthdisplayplayer].kartstuff[k_itemroulette])
|
||||
{
|
||||
if (player == &players[fourthdisplayplayer])
|
||||
PLAYROULETTESND;
|
||||
}
|
||||
}
|
||||
else
|
||||
PLAYROULETTESND;
|
||||
#undef PLAYROULETTESND
|
||||
}
|
||||
|
||||
roulettestop = (TICRATE*1) + (3*(pingame - player->kartstuff[k_position]));
|
||||
|
||||
|
|
Loading…
Reference in a new issue