fixed starting directly in-game with option -N

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3441 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2009-04-29 00:21:47 +00:00
parent a6ca49a561
commit 9f6575c72b
3 changed files with 10 additions and 2 deletions

View File

@ -79,7 +79,14 @@ void clear()
g_env->clear();
g_current_screen = NULL;
}
// -----------------------------------------------------------------------------
void cleanForGame()
{
clear();
if(g_irrlicht_event_core == NULL) g_irrlicht_event_core = new IrrlichtEventCore();
g_device->setEventReceiver(g_irrlicht_event_core);
}
// -----------------------------------------------------------------------------
void switchToScreen(const char* screen_name)
{
// clean what was left by the previous screen

View File

@ -183,6 +183,7 @@ namespace GUIEngine
void free();
void switchToScreen(const char* );
void clear();
void cleanForGame();
Screen* getCurrentScreen();
void reshowCurrentScreen();

View File

@ -503,7 +503,7 @@ namespace StateManager
g_menu_stack.clear();
g_menu_stack.push_back("race");
g_game_mode = true;
GUIEngine::clear();
GUIEngine::cleanForGame();
input_manager->setMode(InputManager::INGAME);
}