diff --git a/src/scene_battle_rpg2k.cpp b/src/scene_battle_rpg2k.cpp index 07fca2c924..36aa5da6e8 100644 --- a/src/scene_battle_rpg2k.cpp +++ b/src/scene_battle_rpg2k.cpp @@ -849,7 +849,7 @@ int Scene_Battle_Rpg2k::GetDelayForLine() { } void Scene_Battle_Rpg2k::SetWaitForEnemyAppearanceMessages() { - if ((enemy_iterator == Main_Data::game_enemyparty->GetEnemies().end() && + if ((enemy_iterator == visible_enemies.end() && !battle_message_window->GetHiddenLineCount()) || battle_message_window->IsPageFilled()) { encounter_message_sleep_until = Player::GetFrames() + GetDelayForWindow(); @@ -861,7 +861,8 @@ void Scene_Battle_Rpg2k::SetWaitForEnemyAppearanceMessages() { bool Scene_Battle_Rpg2k::DisplayMonstersInMessageWindow() { if (encounter_message_first_monster) { - enemy_iterator = Main_Data::game_enemyparty->GetEnemies().begin(); + Main_Data::game_enemyparty->GetActiveBattlers(visible_enemies); + enemy_iterator = visible_enemies.begin(); encounter_message_first_monster = false; } @@ -885,7 +886,7 @@ bool Scene_Battle_Rpg2k::DisplayMonstersInMessageWindow() { return false; } - if (enemy_iterator == Main_Data::game_enemyparty->GetEnemies().end()) { + if (enemy_iterator == visible_enemies.end()) { battle_message_window->Clear(); if (Game_Temp::battle_first_strike && !encounter_message_first_strike) { battle_message_window->Push(Data::terms.special_combat); diff --git a/src/scene_battle_rpg2k.h b/src/scene_battle_rpg2k.h index 1e03ba9a52..3b00164463 100644 --- a/src/scene_battle_rpg2k.h +++ b/src/scene_battle_rpg2k.h @@ -120,7 +120,8 @@ class Scene_Battle_Rpg2k : public Scene_Battle { std::unique_ptr battle_message_window; std::vector battle_result_messages; std::vector::iterator battle_result_messages_it; - std::vector >::const_iterator enemy_iterator; + std::vector visible_enemies; + std::vector::const_iterator enemy_iterator; int battle_action_wait; int battle_action_state;