Autowalker now opens the map at first to test that it works.
This commit is contained in:
parent
edf10c976a
commit
c4ed26184b
1 changed files with 6 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue