P_EndingMusic: Change priority

- In gametypes where you can exit successfully but get PF_NOCONTEST, play the _lose jingle instead of RETIRE
    - Affects Prison Break, Sealed Stars
- If you're losing, even if in first place, don't play the _first jingle
    - Affects Prison Break
This commit is contained in:
toaster 2023-05-01 18:58:18 +01:00
parent d27a2fc7ef
commit 6882ea7671

View file

@ -733,16 +733,16 @@ void P_EndingMusic(void)
continue;
}
if (checkPlayer->pflags & PF_NOCONTEST)
{
// No Contest, use special value
;
}
else if (checkPlayer->exiting)
if (checkPlayer->exiting)
{
// Standard exit, use their position
pos = checkPlayer->position;
}
else if (checkPlayer->pflags & PF_NOCONTEST)
{
// No Contest without finishing, use special value
;
}
else
{
// Not finished, ignore
@ -778,15 +778,7 @@ void P_EndingMusic(void)
}
else
{
if (bestPlayer->position == 1)
{
jingle = "_first";
}
else if (K_IsPlayerLosing(bestPlayer) == false)
{
jingle = "_win";
}
else
if (K_IsPlayerLosing(bestPlayer) == true)
{
jingle = "_lose";
@ -796,6 +788,14 @@ void P_EndingMusic(void)
nointer = true;
}
}
else if (bestPlayer->position == 1)
{
jingle = "_first";
}
else if (K_IsPlayerLosing(bestPlayer) == false)
{
jingle = "_win";
}
}
if (nointer == true)