Skip to content

Commit 5d0f19f

Browse files
sapierproller
sapier
authored andcommitted
Fix bug in pathfinder causing endless loop in some situations
1 parent a0ef75d commit 5d0f19f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/pathfinder.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -823,6 +823,7 @@ bool pathfinder::update_cost_heuristic( v3s16 ipos,
823823
" out of range (" << m_limits.X.max << "," <<
824824
m_limits.Y.max << "," << m_limits.Z.max
825825
<<")" << std::endl);
826+
direction = get_dir_heuristic(directions,g_pos);
826827
continue;
827828
}
828829

@@ -831,6 +832,7 @@ bool pathfinder::update_cost_heuristic( v3s16 ipos,
831832
if (!g_pos2.valid) {
832833
VERBOSE_TARGET << LVL "Pathfinder: no data for new position: "
833834
<< PPOS(ipos2) << std::endl;
835+
direction = get_dir_heuristic(directions,g_pos);
834836
continue;
835837
}
836838

0 commit comments

Comments
 (0)