mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
P_DoAllPlayersExit: Play finish sounds on successful execution
- If a local player is already finished, don't play any sound - If the local players finish as a result of this, play the race finish line cross sound - Else, play the race opponent finish line cross sound
This commit is contained in:
parent
12ecb1f7a4
commit
9497941ef6
1 changed files with 17 additions and 0 deletions
17
src/p_user.c
17
src/p_user.c
|
|
@ -1376,6 +1376,7 @@ void P_DoAllPlayersExit(pflags_t flags, boolean trygivelife)
|
|||
{
|
||||
UINT8 i;
|
||||
boolean givenlife = false;
|
||||
const boolean dofinishsound = (musiccountdown == 0);
|
||||
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
|
|
@ -1399,6 +1400,22 @@ void P_DoAllPlayersExit(pflags_t flags, boolean trygivelife)
|
|||
givenlife = true;
|
||||
}
|
||||
|
||||
if (!dofinishsound)
|
||||
{
|
||||
// You've already finished, don't play again
|
||||
;
|
||||
}
|
||||
else if (musiccountdown == 0)
|
||||
{
|
||||
// Other people finish
|
||||
S_StartSound(NULL, sfx_s253);
|
||||
}
|
||||
else if (musiccountdown > 1)
|
||||
{
|
||||
// Everyone finish sound
|
||||
S_StartSound(NULL, sfx_s3k6a);
|
||||
}
|
||||
|
||||
if (givenlife)
|
||||
{
|
||||
// Life sound
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue