mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 20:41:46 +00:00
P_EndingMusic: Play "EMRLD" in Emerald contexts
- gametype has GTR_POWERSTONES and any one player has all 7 emeralds
- gametyperules & GTR_SPECIALSTART and any one player isn't losing
- GP after completing a GPEVENT_SPECIAL and any one player isn't losing
- Catches custom gametypes in place of Sealed Star at the end of a GP
This commit is contained in:
parent
78404af6fe
commit
e507a8b0ad
1 changed files with 41 additions and 5 deletions
46
src/p_user.c
46
src/p_user.c
|
|
@ -714,12 +714,50 @@ void P_PlayVictorySound(mobj_t *source)
|
||||||
void P_EndingMusic(void)
|
void P_EndingMusic(void)
|
||||||
{
|
{
|
||||||
const char *jingle = NULL;
|
const char *jingle = NULL;
|
||||||
boolean nointer = false;
|
|
||||||
UINT8 bestPos = UINT8_MAX;
|
UINT8 bestPos = UINT8_MAX;
|
||||||
player_t *bestPlayer = NULL;
|
player_t *bestPlayer = NULL;
|
||||||
|
|
||||||
SINT8 i;
|
SINT8 i;
|
||||||
|
|
||||||
|
// See G_DoCompleted and Y_DetermineIntermissionType
|
||||||
|
boolean nointer = ((modeattacking && (players[consoleplayer].pflags & PF_NOCONTEST))
|
||||||
|
|| (grandprixinfo.gp == true && grandprixinfo.eventmode != GPEVENT_NONE));
|
||||||
|
|
||||||
|
for (i = 0; i < MAXPLAYERS; i++)
|
||||||
|
{
|
||||||
|
if (!playeringame[i]
|
||||||
|
|| players[i].spectator)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
// Battle powerstone win
|
||||||
|
if ((gametyperules & GTR_POWERSTONES)
|
||||||
|
&& ALLCHAOSEMERALDS(players[i].emeralds))
|
||||||
|
break;
|
||||||
|
|
||||||
|
// Special round?
|
||||||
|
if (((gametyperules & GTR_SPECIALSTART)
|
||||||
|
|| (grandprixinfo.gp == true
|
||||||
|
&& grandprixinfo.eventmode == GPEVENT_SPECIAL)
|
||||||
|
) == false)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
// Any player has completed well?
|
||||||
|
if (!players[i].exiting
|
||||||
|
|| players[i].bot
|
||||||
|
|| K_IsPlayerLosing(&players[i]))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
// Special win
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Event - Emerald Finish
|
||||||
|
if (i != MAXPLAYERS)
|
||||||
|
{
|
||||||
|
jingle = "EMRLD";
|
||||||
|
goto skippingposition;
|
||||||
|
}
|
||||||
|
|
||||||
// Event - Level Finish
|
// Event - Level Finish
|
||||||
// Check for if this is valid or not
|
// Check for if this is valid or not
|
||||||
for (i = 0; i <= r_splitscreen; i++)
|
for (i = 0; i <= r_splitscreen; i++)
|
||||||
|
|
@ -756,10 +794,6 @@ void P_EndingMusic(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// See G_DoCompleted and Y_DetermineIntermissionType
|
|
||||||
nointer = ((modeattacking && (players[consoleplayer].pflags & PF_NOCONTEST))
|
|
||||||
|| (grandprixinfo.gp == true && grandprixinfo.eventmode != GPEVENT_NONE));
|
|
||||||
|
|
||||||
if (bestPlayer == NULL)
|
if (bestPlayer == NULL)
|
||||||
{
|
{
|
||||||
// No jingle for you
|
// No jingle for you
|
||||||
|
|
@ -798,6 +832,8 @@ void P_EndingMusic(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
skippingposition:
|
||||||
|
|
||||||
if (nointer == true)
|
if (nointer == true)
|
||||||
{
|
{
|
||||||
// Do not set "racent" in G_Ticker
|
// Do not set "racent" in G_Ticker
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue