Skip to content

Commit

Permalink
Pop all scenes when loading game
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mateofio committed Oct 11, 2018
1 parent 50fc262 commit 0799852
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/scene_load.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<Scene_Map>(true), true);
Scene::PopUntil(Scene::Title);
Scene::Push(std::make_shared<Scene_Map>(true));
}

bool Scene_Load::IsSlotValid(int index) {
Expand Down

0 comments on commit 0799852

Please sign in to comment.