mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-14 01:19:59 +00:00
Don't save global storage if global scripts didn't run
This commit is contained in:
parent
b5aca012eb
commit
dd09c9b362
@ -141,7 +141,8 @@ namespace MWLua
|
||||
|
||||
void LuaManager::savePermanentStorage(const std::filesystem::path& userConfigPath)
|
||||
{
|
||||
mGlobalStorage.save(userConfigPath / "global_storage.bin");
|
||||
if (mGlobalScriptsStarted)
|
||||
mGlobalStorage.save(userConfigPath / "global_storage.bin");
|
||||
mPlayerStorage.save(userConfigPath / "player_storage.bin");
|
||||
}
|
||||
|
||||
@ -318,6 +319,7 @@ namespace MWLua
|
||||
mPlayer.getRefData().setLuaScripts(nullptr);
|
||||
mPlayer = MWWorld::Ptr();
|
||||
}
|
||||
mGlobalStorage.setActive(true);
|
||||
mGlobalStorage.clearTemporaryAndRemoveCallbacks();
|
||||
mGlobalStorage.setActive(false);
|
||||
mPlayerStorage.clearTemporaryAndRemoveCallbacks();
|
||||
|
Loading…
x
Reference in New Issue
Block a user