forked from mirror/openmw-tes3mp
Fixes #1181: Enable controls when loading a savegame
This commit is contained in:
parent
b8ca067730
commit
6eaa7553f8
4 changed files with 15 additions and 0 deletions
|
@ -20,6 +20,9 @@ namespace MWBase
|
|||
|
||||
InputManager() {}
|
||||
|
||||
/// Clear all savegame-specific data
|
||||
virtual void clear() = 0;
|
||||
|
||||
virtual ~InputManager() {}
|
||||
|
||||
virtual void update(float dt, bool loading) = 0;
|
||||
|
|
|
@ -143,6 +143,13 @@ namespace MWInput
|
|||
mControlSwitch["vanitymode"] = true;
|
||||
}
|
||||
|
||||
void InputManager::clear()
|
||||
{
|
||||
// Enable all controls
|
||||
for (std::map<std::string, bool>::iterator it = mControlSwitch.begin(); it != mControlSwitch.end(); ++it)
|
||||
it->second = true;
|
||||
}
|
||||
|
||||
InputManager::~InputManager()
|
||||
{
|
||||
mInputBinder->save (mUserFile);
|
||||
|
|
|
@ -65,6 +65,9 @@ namespace MWInput
|
|||
|
||||
virtual ~InputManager();
|
||||
|
||||
/// Clear all savegame-specific data
|
||||
virtual void clear();
|
||||
|
||||
virtual void update(float dt, bool loading);
|
||||
|
||||
void setPlayer (MWWorld::Player* player) { mPlayer = player; }
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include "../mwbase/mechanicsmanager.hpp"
|
||||
#include "../mwbase/scriptmanager.hpp"
|
||||
#include "../mwbase/soundmanager.hpp"
|
||||
#include "../mwbase/inputmanager.hpp"
|
||||
|
||||
#include "../mwworld/player.hpp"
|
||||
#include "../mwworld/class.hpp"
|
||||
|
@ -39,6 +40,7 @@ void MWState::StateManager::cleanup (bool force)
|
|||
MWBase::Environment::get().getScriptManager()->getGlobalScripts().clear();
|
||||
MWBase::Environment::get().getWorld()->clear();
|
||||
MWBase::Environment::get().getWindowManager()->clear();
|
||||
MWBase::Environment::get().getInputManager()->clear();
|
||||
|
||||
mState = State_NoGame;
|
||||
mCharacterManager.clearCurrentCharacter();
|
||||
|
|
Loading…
Reference in a new issue