aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2010-08-23 10:01:43 +0000
committerEugene Sandulenko2010-10-12 23:17:58 +0000
commit11219f12a694c082d1df73ed670ee6578c3e746c (patch)
tree09362249c18f4c48be2c141f885fe489818ea4e3
parent1e8b91ef2b94accc1f5d25c334eab8ee05b4bd7a (diff)
downloadscummvm-rg350-11219f12a694c082d1df73ed670ee6578c3e746c.tar.gz
scummvm-rg350-11219f12a694c082d1df73ed670ee6578c3e746c.tar.bz2
scummvm-rg350-11219f12a694c082d1df73ed670ee6578c3e746c.zip
SWORD25: Bugfix to walk path detection
svn-id: r53289
-rw-r--r--engines/sword25/math/walkregion.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/sword25/math/walkregion.cpp b/engines/sword25/math/walkregion.cpp
index 729e32e8dd..c42bcedf83 100644
--- a/engines/sword25/math/walkregion.cpp
+++ b/engines/sword25/math/walkregion.cpp
@@ -196,7 +196,6 @@ bool WalkRegion::FindPath(const Vertex &Start, const Vertex &End, BS_Path &Path)
for (unsigned int i = 0; i < m_Nodes.size(); i++) {
// Determine the nearest edge node in the node list
DijkstraNode::Iter NodeInter = ChooseClosestNode(DijkstraNodes);
- (*NodeInter).Chosen = true;
// If no free nodes are absent from the edge node list, there is no path from start
// to end node. This case should never occur, since the number of loop passes is
@@ -204,6 +203,7 @@ bool WalkRegion::FindPath(const Vertex &Start, const Vertex &End, BS_Path &Path)
if (NodeInter == DijkstraNodes.end()) return false;
// If the destination point is closer than the point cost, scan can stop
+ (*NodeInter).Chosen = true;
if (EndPoint.Cost <= (*NodeInter).Cost) {
// Insert the end point in the list
Path.push_back(End);