Fix bug in pathfinder causing endless loop in some situations
parent
a0ef75d32d
commit
5d0f19fd7d
|
@ -823,6 +823,7 @@ bool pathfinder::update_cost_heuristic( v3s16 ipos,
|
||||||
" out of range (" << m_limits.X.max << "," <<
|
" out of range (" << m_limits.X.max << "," <<
|
||||||
m_limits.Y.max << "," << m_limits.Z.max
|
m_limits.Y.max << "," << m_limits.Z.max
|
||||||
<<")" << std::endl);
|
<<")" << std::endl);
|
||||||
|
direction = get_dir_heuristic(directions,g_pos);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -831,6 +832,7 @@ bool pathfinder::update_cost_heuristic( v3s16 ipos,
|
||||||
if (!g_pos2.valid) {
|
if (!g_pos2.valid) {
|
||||||
VERBOSE_TARGET << LVL "Pathfinder: no data for new position: "
|
VERBOSE_TARGET << LVL "Pathfinder: no data for new position: "
|
||||||
<< PPOS(ipos2) << std::endl;
|
<< PPOS(ipos2) << std::endl;
|
||||||
|
direction = get_dir_heuristic(directions,g_pos);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue