From 0799852d3f42dfafcdf75ad1cafb3d9ad2cda54b Mon Sep 17 00:00:00 2001 From: Matthew Fioravante Date: Mon, 8 Oct 2018 19:06:21 -0400 Subject: [PATCH] Pop all scenes when loading game Fixes bugs when loading game debug menu. The stack would keep the old maps and game state. This breaks when you try to load from battle. --- src/scene_load.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/scene_load.cpp b/src/scene_load.cpp index 002519211e..3b040e9a2e 100644 --- a/src/scene_load.cpp +++ b/src/scene_load.cpp @@ -41,7 +41,8 @@ void Scene_Load::Action(int index) { Player::LoadSavegame(save_name); Game_Temp::restart_title_cache = true; - Scene::Push(std::make_shared(true), true); + Scene::PopUntil(Scene::Title); + Scene::Push(std::make_shared(true)); } bool Scene_Load::IsSlotValid(int index) {