mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
K_FollowerHornTaunt: fix mistaken port priority on horns
Incorrect behaviour sometimes prevented you from hearing somebody else's horn based on player slot order
This commit is contained in:
parent
21a4e7ae43
commit
0b1be76442
1 changed files with 13 additions and 4 deletions
|
|
@ -773,12 +773,21 @@ void K_FollowerHornTaunt(player_t *taunter, player_t *victim)
|
|||
honk->fuse = TICRATE/2;
|
||||
honk->renderflags |= RF_DONTDRAW;
|
||||
|
||||
if (P_IsDisplayPlayer(victim) || P_IsDisplayPlayer(taunter))
|
||||
S_StartSound(NULL, fl->hornsound);
|
||||
|
||||
honk->flags2 |= MF2_AMBUSH;
|
||||
}
|
||||
|
||||
honk->renderflags &= ~K_GetPlayerDontDrawFlag(victim);
|
||||
UINT32 dontdrawflag = K_GetPlayerDontDrawFlag(victim);
|
||||
|
||||
// A display player is affected!
|
||||
if (dontdrawflag != 0)
|
||||
{
|
||||
// Only play the sound for the first seen display player
|
||||
if ((honk->renderflags & RF_DONTDRAW) == RF_DONTDRAW)
|
||||
{
|
||||
S_StartSound(NULL, fl->hornsound);
|
||||
}
|
||||
|
||||
honk->renderflags &= ~dontdrawflag;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue