summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKUDr <kudr@openttd.org>2007-04-20 19:19:23 +0000
committerKUDr <kudr@openttd.org>2007-04-20 19:19:23 +0000
commit3df265663303cabfe3272c32c6a203d2598f90f2 (patch)
tree64904e790e7ed19c9df2926079e9467a21457ad4 /src
parent4728765870decb62b63098861dcd841de4e2ad9f (diff)
downloadopenttd-3df265663303cabfe3272c32c6a203d2598f90f2.tar.xz
(svn r9694) -Fix [YAPF][FS#736]: the guessed path (when PF stopped on max. # of nodes passed) was ignored for ships (desolator)
Diffstat (limited to 'src')
-rw-r--r--src/yapf/yapf_ship.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/yapf/yapf_ship.cpp b/src/yapf/yapf_ship.cpp
index b612bcf67..0ac6f23d6 100644
--- a/src/yapf/yapf_ship.cpp
+++ b/src/yapf/yapf_ship.cpp
@@ -64,10 +64,10 @@ public:
bool bFound = pf.FindPath(v);
Trackdir next_trackdir = INVALID_TRACKDIR; // this would mean "path not found"
- if (bFound) {
- // path was found
+
+ Node* pNode = pf.GetBestNode();
+ if (pNode != NULL) {
// walk through the path back to the origin
- Node* pNode = pf.GetBestNode();
Node* pPrevNode = NULL;
while (pNode->m_parent != NULL) {
pPrevNode = pNode;