fixed pathfinding bug

This commit is contained in:
va_alpatov
2026-04-11 20:06:39 +03:00
parent 8f65183882
commit 93e7a9457a

View File

@@ -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))