mirror of https://github.com/OpenTTD/OpenTTD
(svn r9694) -Fix [YAPF][FS#736]: the guessed path (when PF stopped on max. # of nodes passed) was ignored for ships (desolator)
parent
4728765870
commit
3df2656633
|
@ -64,10 +64,10 @@ public:
|
||||||
bool bFound = pf.FindPath(v);
|
bool bFound = pf.FindPath(v);
|
||||||
|
|
||||||
Trackdir next_trackdir = INVALID_TRACKDIR; // this would mean "path not found"
|
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
|
// walk through the path back to the origin
|
||||||
Node* pNode = pf.GetBestNode();
|
|
||||||
Node* pPrevNode = NULL;
|
Node* pPrevNode = NULL;
|
||||||
while (pNode->m_parent != NULL) {
|
while (pNode->m_parent != NULL) {
|
||||||
pPrevNode = pNode;
|
pPrevNode = pNode;
|
||||||
|
|
Loading…
Reference in New Issue