diff options
author | KUDr <KUDr@openttd.org> | 2007-04-20 19:19:23 +0000 |
---|---|---|
committer | KUDr <KUDr@openttd.org> | 2007-04-20 19:19:23 +0000 |
commit | 50aaa26e95418735a3c7943e8787915f72df988d (patch) | |
tree | 64904e790e7ed19c9df2926079e9467a21457ad4 | |
parent | 1a7fec1894b859be9384e51e9a568b833cf1fb47 (diff) | |
download | openttd-50aaa26e95418735a3c7943e8787915f72df988d.tar.xz |
(svn r9694) -Fix [YAPF][FS#736]: the guessed path (when PF stopped on max. # of nodes passed) was ignored for ships (desolator)
-rw-r--r-- | src/yapf/yapf_ship.cpp | 6 |
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; |