diff options
author | sapier <Sapier at GMX dot net> | 2013-08-24 23:42:02 +0200 |
---|---|---|
committer | proller <proller@github.com> | 2013-08-31 21:26:51 +0400 |
commit | 5d0f19fd7db83666bef84c2fb6a641ff76176468 (patch) | |
tree | 936c3f7fa8f1dbd68058c58f4036e0f18b1616a6 /src | |
parent | a0ef75d32df6ef6064bc70678addf136b190f8c6 (diff) | |
download | minetest-5d0f19fd7db83666bef84c2fb6a641ff76176468.tar.gz minetest-5d0f19fd7db83666bef84c2fb6a641ff76176468.tar.bz2 minetest-5d0f19fd7db83666bef84c2fb6a641ff76176468.zip |
Fix bug in pathfinder causing endless loop in some situations
Diffstat (limited to 'src')
-rw-r--r-- | src/pathfinder.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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; } |