mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Add K_IsPlayingDisplayPlayer for HUD sounds
This commit is contained in:
parent
e3fe3ed54a
commit
4997c4c0ed
3 changed files with 11 additions and 3 deletions
|
|
@ -12630,4 +12630,10 @@ void K_SetTireGrease(player_t *player, tic_t tics)
|
|||
player->tiregrease = tics;
|
||||
}
|
||||
|
||||
// somewhat sensible check for HUD sounds in a post-bot-takeover world
|
||||
boolean K_IsPlayingDisplayPlayer(player_t *player)
|
||||
{
|
||||
return P_IsDisplayPlayer(player) && (!player->exiting);
|
||||
}
|
||||
|
||||
//}
|
||||
|
|
|
|||
|
|
@ -243,6 +243,8 @@ boolean K_isPlayerInSpecialState(player_t *p);
|
|||
|
||||
void K_SetTireGrease(player_t *player, tic_t tics);
|
||||
|
||||
boolean K_IsPlayingDisplayPlayer(player_t *player);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1633,7 +1633,7 @@ void K_KartItemRoulette(player_t *const player, ticcmd_t *const cmd)
|
|||
//player->karthud[khud_itemblinkmode] = 1;
|
||||
//player->karthud[khud_rouletteoffset] = K_GetRouletteOffset(roulette, FRACUNIT);
|
||||
|
||||
if (P_IsDisplayPlayer(player))
|
||||
if (K_IsPlayingDisplayPlayer(player))
|
||||
{
|
||||
S_StartSound(NULL, sfx_itrole);
|
||||
}
|
||||
|
|
@ -1680,7 +1680,7 @@ void K_KartItemRoulette(player_t *const player, ticcmd_t *const cmd)
|
|||
player->karthud[khud_itemblinkmode] = 0;
|
||||
player->karthud[khud_rouletteoffset] = K_GetRouletteOffset(roulette, FRACUNIT);
|
||||
|
||||
if (P_IsDisplayPlayer(player))
|
||||
if (K_IsPlayingDisplayPlayer(player))
|
||||
{
|
||||
if (roulette->ringbox)
|
||||
{
|
||||
|
|
@ -1714,7 +1714,7 @@ void K_KartItemRoulette(player_t *const player, ticcmd_t *const cmd)
|
|||
// This makes the roulette produce the random noises.
|
||||
roulette->sound = (roulette->sound + 1) % 8;
|
||||
|
||||
if (P_IsDisplayPlayer(player))
|
||||
if (K_IsPlayingDisplayPlayer(player))
|
||||
{
|
||||
if (roulette->ringbox)
|
||||
S_StartSound(NULL, sfx_s240);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue