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