From: sapier Date: Sat, 24 Aug 2013 21:42:02 +0000 (+0200) Subject: Fix bug in pathfinder causing endless loop in some situations X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=5d0f19fd7db83666bef84c2fb6a641ff76176468;p=zefram%2Fminetest%2Fminetest_engine.git Fix bug in pathfinder causing endless loop in some situations --- diff --git a/src/pathfinder.cpp b/src/pathfinder.cpp index a173e33d..3e8a73ac 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; }