From 3df265663303cabfe3272c32c6a203d2598f90f2 Mon Sep 17 00:00:00 2001 From: KUDr Date: Fri, 20 Apr 2007 19:19:23 +0000 Subject: (svn r9694) -Fix [YAPF][FS#736]: the guessed path (when PF stopped on max. # of nodes passed) was ignored for ships (desolator) --- src/yapf/yapf_ship.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/yapf') 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; -- cgit v1.2.3-70-g09d2