From 5d0f19fd7db83666bef84c2fb6a641ff76176468 Mon Sep 17 00:00:00 2001 From: sapier Date: Sat, 24 Aug 2013 23:42:02 +0200 Subject: [PATCH] Fix bug in pathfinder causing endless loop in some situations --- src/pathfinder.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pathfinder.cpp b/src/pathfinder.cpp index a173e33d5..3e8a73ac2 100644 --- a/src/pathfinder.cpp +++ b/src/pathfinder.cpp @@ -823,6 +823,7 @@ bool pathfinder::update_cost_heuristic( v3s16 ipos, " out of range (" << m_limits.X.max << "," << m_limits.Y.max << "," << m_limits.Z.max <<")" << std::endl); + direction = get_dir_heuristic(directions,g_pos); continue; } @@ -831,6 +832,7 @@ bool pathfinder::update_cost_heuristic( v3s16 ipos, if (!g_pos2.valid) { VERBOSE_TARGET << LVL "Pathfinder: no data for new position: " << PPOS(ipos2) << std::endl; + direction = get_dir_heuristic(directions,g_pos); continue; } -- 2.25.1