Go back to the overworld in losing challenges (#3192)
This commit is contained in:
parent
45aa9c2e3a
commit
f16ed91bd5
@ -387,17 +387,25 @@ void RaceResultGUI::eventCallback(GUIEngine::Widget* widget,
|
||||
return;
|
||||
}
|
||||
|
||||
// This is a normal race, nothing was unlocked
|
||||
// -------------------------------------------
|
||||
StateManager::get()->popMenu();
|
||||
if (name == "top") // Setup new race
|
||||
{
|
||||
race_manager->exitRace();
|
||||
race_manager->setAIKartOverride("");
|
||||
Screen* newStack[] = { MainMenuScreen::getInstance(),
|
||||
RaceSetupScreen::getInstance(),
|
||||
NULL };
|
||||
StateManager::get()->resetAndSetStack(newStack);
|
||||
|
||||
//If pressing continue quickly in a losing challenge
|
||||
if (race_manager->raceWasStartedFromOverworld())
|
||||
{
|
||||
StateManager::get()->resetAndGoToScreen(MainMenuScreen::getInstance());
|
||||
OverWorld::enterOverWorld();
|
||||
}
|
||||
else
|
||||
{
|
||||
Screen* newStack[] = { MainMenuScreen::getInstance(),
|
||||
RaceSetupScreen::getInstance(),
|
||||
NULL };
|
||||
StateManager::get()->resetAndSetStack(newStack);
|
||||
}
|
||||
}
|
||||
else if (name == "middle") // Restart
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user