mirror of
https://github.com/orange-cpp/omath.git
synced 2026-04-18 15:23:26 +00:00
fixed pathfinding bug
This commit is contained in:
@@ -87,11 +87,11 @@ namespace omath::pathfinding
|
||||
|
||||
const auto current_node = current_node_it->second;
|
||||
|
||||
closed_list.emplace(current, current_node);
|
||||
|
||||
if (current == end_vertex)
|
||||
return reconstruct_final_path(closed_list, current);
|
||||
|
||||
closed_list.emplace(current, current_node);
|
||||
|
||||
for (const auto& neighbor: nav_mesh.get_neighbors(current))
|
||||
{
|
||||
if (closed_list.contains(neighbor))
|
||||
|
||||
Reference in New Issue
Block a user