From abc839480160fb144e47a2722e6be24d0ddc92b1 Mon Sep 17 00:00:00 2001 From: Flakebi Date: Thu, 27 Nov 2014 15:20:12 +0100 Subject: [PATCH 1/2] Fix two little glitches in intro and outro scenes --- src/modes/cutscene_world.cpp | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/src/modes/cutscene_world.cpp b/src/modes/cutscene_world.cpp index 08e90e066..e19dc9f2e 100644 --- a/src/modes/cutscene_world.cpp +++ b/src/modes/cutscene_world.cpp @@ -408,7 +408,6 @@ void CutsceneWorld::enterRaceOverState() GUIEngine::Screen* newStack[] = { mainMenu, credits, NULL }; race_manager->exitRace(); StateManager::get()->resetAndSetStack(newStack); - credits->push(); } // TODO: remove hardcoded knowledge of cutscenes, replace with scripting probably else if (m_parts.size() == 1 && m_parts[0] == "gpwin") @@ -515,18 +514,15 @@ void CutsceneWorld::enterRaceOverState() race_manager->getTrackName() == "introcutscene2") { PlayerProfile *player = PlayerManager::getCurrentPlayer(); - if (player->isFirstTime()) - { - race_manager->exitRace(); - StateManager::get()->resetAndGoToScreen(MainMenuScreen::getInstance()); + race_manager->exitRace(); + StateManager::get()->resetAndGoToScreen(MainMenuScreen::getInstance()); - player->setFirstTime(false); - PlayerManager::get()->save(); - KartSelectionScreen* s = OfflineKartSelectionScreen::getInstance(); - s->setMultiplayer(false); - s->setGoToOverworldNext(); - s->push(); - } + player->setFirstTime(false); + PlayerManager::get()->save(); + KartSelectionScreen* s = OfflineKartSelectionScreen::getInstance(); + s->setMultiplayer(false); + s->setGoToOverworldNext(); + s->push(); } // TODO: remove hardcoded knowledge of cutscenes, replace with scripting probably else if (m_parts.size() == 1 && m_parts[0] == "featunlocked") From fbba008a1a33ae3206675fceb3157719b5b0da81 Mon Sep 17 00:00:00 2001 From: Flakebi Date: Mon, 22 Dec 2014 23:12:20 +0100 Subject: [PATCH 2/2] Restore ancient behaviour --- src/modes/cutscene_world.cpp | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/src/modes/cutscene_world.cpp b/src/modes/cutscene_world.cpp index e19dc9f2e..0aff4dfed 100644 --- a/src/modes/cutscene_world.cpp +++ b/src/modes/cutscene_world.cpp @@ -514,15 +514,22 @@ void CutsceneWorld::enterRaceOverState() race_manager->getTrackName() == "introcutscene2") { PlayerProfile *player = PlayerManager::getCurrentPlayer(); - race_manager->exitRace(); - StateManager::get()->resetAndGoToScreen(MainMenuScreen::getInstance()); - - player->setFirstTime(false); - PlayerManager::get()->save(); - KartSelectionScreen* s = OfflineKartSelectionScreen::getInstance(); - s->setMultiplayer(false); - s->setGoToOverworldNext(); - s->push(); + if (player->isFirstTime()) + { + race_manager->exitRace(); + StateManager::get()->resetAndGoToScreen(MainMenuScreen::getInstance()); + player->setFirstTime(false); + PlayerManager::get()->save(); + KartSelectionScreen* s = OfflineKartSelectionScreen::getInstance(); + s->setMultiplayer(false); + s->setGoToOverworldNext(); + s->push(); + } else + { + race_manager->exitRace(); + StateManager::get()->resetAndGoToScreen(MainMenuScreen::getInstance()); + OverWorld::enterOverWorld(); + } } // TODO: remove hardcoded knowledge of cutscenes, replace with scripting probably else if (m_parts.size() == 1 && m_parts[0] == "featunlocked")