Fix not returning to main menu on failed loads when using quickload

deque
scrawl 11 years ago
parent 7ab98f0c6f
commit abd6b6ab33

@ -222,12 +222,6 @@ namespace MWGui
MWBase::Environment::get().getStateManager()->loadGame (mCurrentCharacter, mCurrentSlot);
}
}
if (MWBase::Environment::get().getStateManager()->getState()==
MWBase::StateManager::State_NoGame)
{
MWBase::Environment::get().getWindowManager()->pushGuiMode (MWGui::GM_MainMenu);
}
}
void SaveGameDialog::onOkButtonClicked(MyGUI::Widget *sender)

@ -371,6 +371,8 @@ void MWState::StateManager::loadGame (const Character *character, const Slot *sl
{
std::cerr << "failed to load saved game: " << e.what() << std::endl;
cleanup (true);
MWBase::Environment::get().getWindowManager()->pushGuiMode (MWGui::GM_MainMenu);
}
}

@ -233,6 +233,10 @@ namespace MWWorld
if (!bypass)
MWBase::Environment::get().getWindowManager()->playVideo(mFallback.getFallbackString("Movies_New_Game"), true);
// enable collision
if (!mPhysics->toggleCollisionMode())
mPhysics->toggleCollisionMode();
// we don't want old weather to persist on a new game
delete mWeatherManager;
mWeatherManager = 0;
@ -248,10 +252,6 @@ namespace MWWorld
mLocalScripts.clear();
mPlayer->clear();
// enable collision
if (!mPhysics->toggleCollisionMode())
mPhysics->toggleCollisionMode();
mWorldScene->changeToVoid();
mStore.clearDynamic();

Loading…
Cancel
Save