Skip to content

Commit

Permalink
Fix bug in pathfinder causing endless loop in some situations
Browse files Browse the repository at this point in the history
  • Loading branch information
sapier authored and proller committed Aug 31, 2013
1 parent a0ef75d commit 5d0f19f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/pathfinder.cpp
Expand Up @@ -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;
}

Expand All @@ -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;
}

Expand Down

0 comments on commit 5d0f19f

Please sign in to comment.