mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Replace the Playground Hack with a specific fix via a case that needed its own function
This commit is contained in:
parent
998823db32
commit
43fef1a59b
6 changed files with 28 additions and 13 deletions
|
|
@ -5130,7 +5130,7 @@ void G_EndGame(void)
|
|||
return;
|
||||
}
|
||||
|
||||
if (gametype == GT_TUTORIAL && M_GameTrulyStarted() && restoreMenu == NULL)
|
||||
if (gametype == GT_TUTORIAL && M_GameAboutToStart() && restoreMenu == NULL)
|
||||
{
|
||||
// Playground Hack
|
||||
F_StartIntro();
|
||||
|
|
|
|||
|
|
@ -829,18 +829,11 @@ void M_StartControlPanel(void)
|
|||
|
||||
if (gamedata != NULL
|
||||
&& gamedata->gonerlevel < GDGONER_OUTRO
|
||||
&& gamestartchallenge < MAXUNLOCKABLES)
|
||||
{
|
||||
// See M_GameTrulyStarted
|
||||
if (
|
||||
gamedata->unlockpending[gamestartchallenge]
|
||||
|| gamedata->unlocked[gamestartchallenge]
|
||||
)
|
||||
&& M_GameAboutToStart())
|
||||
{
|
||||
gamedata->gonerlevel = GDGONER_OUTRO;
|
||||
M_GonerBGImplyPassageOfTime();
|
||||
}
|
||||
}
|
||||
|
||||
if (M_GameTrulyStarted() == false)
|
||||
{
|
||||
|
|
|
|||
21
src/m_cond.c
21
src/m_cond.c
|
|
@ -3475,6 +3475,27 @@ boolean M_GameTrulyStarted(void)
|
|||
return (gamedata->gonerlevel == GDGONER_DONE);
|
||||
}
|
||||
|
||||
boolean M_GameAboutToStart(void)
|
||||
{
|
||||
// Fail safe
|
||||
if (gamedata == NULL)
|
||||
return false;
|
||||
|
||||
// Not set
|
||||
if (gamestartchallenge >= MAXUNLOCKABLES)
|
||||
return true;
|
||||
|
||||
// An unfortunate sidestep, but sync is important.
|
||||
if (netgame)
|
||||
return true;
|
||||
|
||||
// Pending unlocked, but not unlocked
|
||||
return (
|
||||
gamedata->unlockpending[gamestartchallenge]
|
||||
&& !gamedata->unlocked[gamestartchallenge]
|
||||
);
|
||||
}
|
||||
|
||||
boolean M_CheckNetUnlockByID(UINT16 unlockid)
|
||||
{
|
||||
if (unlockid >= MAXUNLOCKABLES
|
||||
|
|
|
|||
|
|
@ -472,6 +472,7 @@ extern UINT16 gamestartchallenge;
|
|||
boolean M_CheckNetUnlockByID(UINT16 unlockid);
|
||||
boolean M_SecretUnlocked(INT32 type, boolean local);
|
||||
boolean M_GameTrulyStarted(void);
|
||||
boolean M_GameAboutToStart(void);
|
||||
boolean M_CupLocked(cupheader_t *cup);
|
||||
boolean M_CupSecondRowLocked(void);
|
||||
boolean M_MapLocked(UINT16 mapnum);
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ void M_QuitSRB2(INT32 choice)
|
|||
|
||||
(void)choice;
|
||||
|
||||
if (M_GameTrulyStarted())
|
||||
if (!M_GameAboutToStart() && M_GameTrulyStarted())
|
||||
{
|
||||
INT32 mrand = M_RandomKey(sizeof(quitsounds) / sizeof(INT32));
|
||||
if (quitsounds[mrand])
|
||||
|
|
|
|||
|
|
@ -562,7 +562,7 @@ void M_EndGame(INT32 choice)
|
|||
return;
|
||||
|
||||
if (M_GameTrulyStarted() == false
|
||||
|| (gametype == GT_TUTORIAL && restoreMenu == NULL)) // Playground Hack
|
||||
|| M_GameAboutToStart() == true) // Playground Hack
|
||||
{
|
||||
// No returning to the title screen.
|
||||
M_QuitSRB2(-1);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue