Stop random starting of overworld after multiplayer kartselection

Since the variable m_from_overworld wasn't being initialized, its value could randomly be true.
It was also not being set when clicking multiplayer in main menu.
Making it initialize to false as well as setting it when clicking multiplayer to be on the safe side.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11170 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
wardje
2012-04-27 18:09:09 +00:00
parent 7d5f7e85c9
commit f426aac6cb
2 changed files with 2 additions and 0 deletions

View File

@@ -949,6 +949,7 @@ KartSelectionScreen::KartSelectionScreen() : Screen("karts.stkgui")
{
m_removed_widget = NULL;
m_multiplayer_message = NULL;
m_from_overworld = false;
} // KartSelectionScreen
// ----------------------------------------------------------------------------

View File

@@ -264,6 +264,7 @@ void MainMenuScreen::eventCallback(Widget* widget, const std::string& name,
{
KartSelectionScreen* s = KartSelectionScreen::getInstance();
s->setMultiplayer(true);
s->setFromOverworld(false);
StateManager::get()->pushScreen( s );
}
else if (selection == "options")