From ee6ddc34045cdd8207c14971ad0b310856ea5f34 Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Thu, 5 Dec 2013 14:56:30 +0100 Subject: [PATCH] block saving while chargen is in progress --- apps/openmw/mwgui/mainmenu.cpp | 3 ++- apps/openmw/mwstate/statemanagerimp.cpp | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwgui/mainmenu.cpp b/apps/openmw/mwgui/mainmenu.cpp index ff8ab8c937..da1992474b 100644 --- a/apps/openmw/mwgui/mainmenu.cpp +++ b/apps/openmw/mwgui/mainmenu.cpp @@ -97,7 +97,8 @@ namespace MWGui MWBase::Environment::get().getStateManager()->characterEnd()) buttons.push_back("loadgame"); - if (state==MWBase::StateManager::State_Running) + if (state==MWBase::StateManager::State_Running && + MWBase::Environment::get().getWorld()->getGlobalInt ("chargenstate")==-1) buttons.push_back("savegame"); buttons.push_back("options"); diff --git a/apps/openmw/mwstate/statemanagerimp.cpp b/apps/openmw/mwstate/statemanagerimp.cpp index 9df1e2dc0a..293a9e232e 100644 --- a/apps/openmw/mwstate/statemanagerimp.cpp +++ b/apps/openmw/mwstate/statemanagerimp.cpp @@ -60,6 +60,8 @@ void MWState::StateManager::newGame (bool bypass) MWBase::Environment::get().getWorld()->startNewGame(); MWBase::Environment::get().getWindowManager()->setNewGame (true); } + else + MWBase::Environment::get().getWorld()->setGlobalInt ("chargenstate", -1); mState = State_Running; }