diff --git a/src/game_interpreter.cpp b/src/game_interpreter.cpp index fd21e34dc1..71fc9409de 100644 --- a/src/game_interpreter.cpp +++ b/src/game_interpreter.cpp @@ -3079,8 +3079,7 @@ void Game_Interpreter::ResetSceneCalling() { } bool Game_Interpreter::IsImmediateCall() { - return scene_call != Scene::Null - || Game_Temp::battle_calling; + return scene_call != Scene::Null; }; // Dummy Continuations diff --git a/src/game_interpreter_map.cpp b/src/game_interpreter_map.cpp index 7e33cdeb37..a86989f4aa 100644 --- a/src/game_interpreter_map.cpp +++ b/src/game_interpreter_map.cpp @@ -258,7 +258,7 @@ bool Game_Interpreter_Map::CommandEnemyEncounter(RPG::EventCommand const& com) { Game_Battle::SetBattleMode(com.parameters[6]); // 0 normal, 1 initiative, 2 surround, 3 back attack, 4 pincer Game_Temp::battle_result = Game_Temp::BattleVictory; - Game_Temp::battle_calling = true; + scene_call = Scene::Battle; SetContinuation(static_cast(&Game_Interpreter_Map::ContinuationEnemyEncounter)); return false; diff --git a/src/scene_map.cpp b/src/scene_map.cpp index 842b65ae00..f48c892c0e 100644 --- a/src/scene_map.cpp +++ b/src/scene_map.cpp @@ -196,6 +196,9 @@ void Scene_Map::Update() { if (Main_Data::game_data.party_location.menu_calling || force_menu_calling) { call = Scene::Menu; } + if (Game_Temp::battle_calling) { + call = Scene::Battle; + } Game_Interpreter::ResetSceneCalling(); switch (call) { @@ -214,14 +217,12 @@ void Scene_Map::Update() { case Scene::Load: CallLoad(); break; + case Scene::Battle: + CallBattle(); + break; default: break; } - - if (Game_Temp::battle_calling) { - CallBattle(); - return; - } } } @@ -255,6 +256,7 @@ void Scene_Map::FinishTeleportPlayer() { // Scene calling stuff. void Scene_Map::CallBattle() { + Game_Temp::battle_calling = true; Main_Data::game_data.system.before_battle_music = Game_System::GetCurrentBGM(); Game_System::SePlay(Game_System::GetSystemSE(Game_System::SFX_BeginBattle)); Game_System::BgmPlay(Game_System::GetSystemBGM(Game_System::BGM_Battle));