mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-02-25 23:11:20 +00:00
Handle Podium unlocks during mapload, not when finishing the ceremony
Solves mid-podium crashes not granting second page material
This commit is contained in:
parent
d3af5db874
commit
64922460ac
3 changed files with 21 additions and 14 deletions
|
|
@ -864,7 +864,11 @@ void K_InitializePodiumWaypoint(player_t *const player)
|
|||
{
|
||||
if ((player != NULL) && (player->mo != NULL))
|
||||
{
|
||||
player->position = K_GetPodiumPosition(player);
|
||||
if (player->position == 0)
|
||||
{
|
||||
// Just in case a netgame scenario with a late joiner ocurrs.
|
||||
player->position = K_GetPodiumPosition(player);
|
||||
}
|
||||
|
||||
if (player->position > 0 && player->position <= MAXPLAYERS)
|
||||
{
|
||||
|
|
@ -989,12 +993,6 @@ void K_FinishCeremony(void)
|
|||
}
|
||||
|
||||
g_podiumData.ranking = true;
|
||||
|
||||
// Play the noise now (via G_UpdateVisited's concluding challenge check)
|
||||
prevmap = gamemap-1;
|
||||
G_UpdateVisited();
|
||||
if (gamedata->deferredsave)
|
||||
G_SaveGameData();
|
||||
}
|
||||
|
||||
/*--------------------------------------------------
|
||||
|
|
@ -1084,8 +1082,11 @@ void K_ResetCeremony(void)
|
|||
}
|
||||
}
|
||||
|
||||
// Save before playing the noise
|
||||
G_SaveGameData();
|
||||
// Update visitation.
|
||||
prevmap = gamemap-1;
|
||||
G_UpdateVisited();
|
||||
|
||||
// will subsequently save in P_LoadLevel
|
||||
}
|
||||
|
||||
/*--------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -1607,7 +1607,7 @@ boolean M_CheckCondition(condition_t *cn, player_t *player)
|
|||
return (grandprixinfo.gamespeed >= cn->requirement);
|
||||
|
||||
case UCRP_PODIUMCUP:
|
||||
if (grandprixinfo.gp == false || K_PodiumRanking() == false)
|
||||
if (grandprixinfo.gp == false || K_PodiumSequence() == false)
|
||||
return false;
|
||||
if (grandprixinfo.cup == NULL
|
||||
|| (
|
||||
|
|
@ -1625,11 +1625,11 @@ boolean M_CheckCondition(condition_t *cn, player_t *player)
|
|||
case UCRP_PODIUMEMERALD:
|
||||
case UCRP_PODIUMPRIZE:
|
||||
return (grandprixinfo.gp == true
|
||||
&& K_PodiumRanking() == true
|
||||
&& K_PodiumSequence() == true
|
||||
&& grandprixinfo.rank.specialWon == true);
|
||||
case UCRP_PODIUMNOCONTINUES:
|
||||
return (grandprixinfo.gp == true
|
||||
&& K_PodiumRanking() == true
|
||||
&& K_PodiumSequence() == true
|
||||
&& grandprixinfo.rank.continuesUsed == 0);
|
||||
|
||||
case UCRP_FINISHCOOL:
|
||||
|
|
@ -2989,7 +2989,7 @@ boolean M_UpdateUnlockablesAndExtraEmblems(boolean loud, boolean doall)
|
|||
}
|
||||
}
|
||||
|
||||
if (!demo.playback && Playing() && (gamestate == GS_LEVEL || K_PodiumRanking() == true))
|
||||
if (!demo.playback && Playing() && (gamestate == GS_LEVEL || K_PodiumSequence() == true))
|
||||
{
|
||||
for (i = 0; i <= splitscreen; i++)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7600,7 +7600,13 @@ static void P_InitLevelSettings(void)
|
|||
|
||||
if (K_PodiumSequence() == true)
|
||||
{
|
||||
; // NOP
|
||||
// Okay, now that everything preceding is handled, set the position.
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
players[i].position = K_GetPodiumPosition(&players[i]);
|
||||
}
|
||||
|
||||
// We don't touch the gamespeed, though!
|
||||
}
|
||||
else if (grandprixinfo.gp == true)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue