Fix AI ignoring teleport locations when moving leader to leader goals
(cherry-picked from commit 45674a3d79
)
This commit is contained in:
parent
5330405274
commit
39e7d69f9a
1 changed files with 2 additions and 1 deletions
|
@ -302,8 +302,9 @@ double move_leader_to_goals_phase::evaluate()
|
|||
}
|
||||
|
||||
pathfind::shortest_path_calculator calc(*leader, current_team(), resources::gameboard->teams(), resources::gameboard->map());
|
||||
const pathfind::teleport_map allowed_teleports = pathfind::get_teleport_locations(*leader, current_team());
|
||||
pathfind::plain_route route = a_star_search(leader->get_location(), dst_, 1000.0, calc,
|
||||
resources::gameboard->map().w(), resources::gameboard->map().h());
|
||||
resources::gameboard->map().w(), resources::gameboard->map().h(), &allowed_teleports);
|
||||
if(route.steps.empty()) {
|
||||
LOG_AI_TESTING_AI_DEFAULT << "route empty";
|
||||
return BAD_SCORE;
|
||||
|
|
Loading…
Add table
Reference in a new issue