diff --git a/autowalker.cpp b/autowalker.cpp index f0f7b03..b5edfaf 100644 --- a/autowalker.cpp +++ b/autowalker.cpp @@ -223,7 +223,6 @@ void Autowalker::handle_player_walk(ai::State& start, ai::State& goal) { auto action = a_plan.script.front(); if(action.name == "find_enemy") { - // this is where to test if enemy found and update state status(L"FINDING ENEMY"); auto paths = path_to_enemies(); process_move(paths); @@ -267,11 +266,17 @@ void Autowalker::autowalk() { } int move_attempts = 0; + bool map_opened_once = false; auto start = ai::load_state("Host::initial_state"); auto goal = ai::load_state("Host::final_state"); do { + if(!fsm.$map_open && !map_opened_once) { + send_event(gui::Event::MAP_OPEN); + map_opened_once = true; + } + handle_window_events(); handle_boss_fight(); handle_player_walk(start, goal);