mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 09:35:28 +00:00
Trigger a game ended state handler before loading to allow menu scripts to do cleanup
This commit is contained in:
parent
2008f35e57
commit
ad8a05e2a1
@ -449,9 +449,12 @@ void MWState::StateManager::loadGame(const Character* character, const std::file
|
||||
{
|
||||
try
|
||||
{
|
||||
// let menu scripts do cleanup
|
||||
mState = State_Ended;
|
||||
MWBase::Environment::get().getLuaManager()->gameEnded();
|
||||
if (mState != State_Ended)
|
||||
{
|
||||
// let menu scripts do cleanup
|
||||
mState = State_Ended;
|
||||
MWBase::Environment::get().getLuaManager()->gameEnded();
|
||||
}
|
||||
|
||||
cleanup();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user