Make main menu actually produce the intro

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11624 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2012-09-21 01:31:08 +00:00
parent b29bd0cd19
commit be16eea136

View File

@ -190,6 +190,7 @@ void MainMenuScreen::eventCallback(Widget* widget, const std::string& name,
ribbon->getSelectionIDString(PLAYER_ID_GAME_MASTER); ribbon->getSelectionIDString(PLAYER_ID_GAME_MASTER);
/*
if (selection == "story") if (selection == "story")
{ {
StateManager::get()->enterGameState(); StateManager::get()->enterGameState();
@ -206,6 +207,7 @@ void MainMenuScreen::eventCallback(Widget* widget, const std::string& name,
//race_manager->startSingleRace("introcutscene2", 999, false); //race_manager->startSingleRace("introcutscene2", 999, false);
return; return;
} }
*/
#if DEBUG_MENU_ITEM #if DEBUG_MENU_ITEM
if (selection == "options") if (selection == "options")
@ -310,12 +312,19 @@ void MainMenuScreen::eventCallback(Widget* widget, const std::string& name,
GameSlot* slot = unlock_manager->getCurrentSlot(); GameSlot* slot = unlock_manager->getCurrentSlot();
if (slot->isFirstTime()) if (slot->isFirstTime())
{ {
slot->setFirstTime(false); StateManager::get()->enterGameState();
unlock_manager->save(); race_manager->setMinorMode(RaceManager::MINOR_MODE_CUTSCENE);
KartSelectionScreen* s = KartSelectionScreen::getInstance(); race_manager->setNumKarts( 0 );
s->setMultiplayer(false); race_manager->setNumPlayers(0);
s->setFromOverworld(true); race_manager->setNumLocalPlayers(0);
StateManager::get()->pushScreen( s ); race_manager->startSingleRace("introcutscene", 999, false);
std::vector<std::string> parts;
parts.push_back("introcutscene");
parts.push_back("introcutscene2");
((CutsceneWorld*)World::getWorld())->setParts(parts);
//race_manager->startSingleRace("introcutscene2", 999, false);
return;
} }
else else
{ {