@@ -64,13 +64,13 @@ public:
bool bFound = pf.FindPath(v);
Trackdir next_trackdir = INVALID_TRACKDIR; // this would mean "path not found"
if (bFound) {
// path was found
// walk through the path back to the origin
Node* pNode = &pf.GetBestNode();
Node* pNode = pf.GetBestNode();
Node* pPrevNode = NULL;
while (pNode->m_parent != NULL) {
pPrevNode = pNode;
pNode = pNode->m_parent;
}
// return trackdir from the best next node (direct child of origin)