(svn r21996) -Fix [FS#4472]: [YAPF] Under some circumstances vehicles could be lost

This commit is contained in:
rubidium
2011-02-06 15:01:52 +00:00
parent 06ff23f61f
commit bd921ed983

View File

@@ -128,6 +128,7 @@ public:
#endif /* !NO_DEBUG_MESSAGES */
Yapf().PfSetStartupNodes();
bool bDestFound = true;
while (true) {
m_num_steps++;
@@ -146,12 +147,12 @@ public:
m_nodes.PopOpenNode(n->GetKey());
m_nodes.InsertClosedNode(*n);
} else {
m_pBestDestNode = m_pBestIntermediateNode;
bDestFound = false;
break;
}
}
bool bDestFound = (m_pBestDestNode != NULL) && (m_pBestDestNode != m_pBestIntermediateNode);
bDestFound &= (m_pBestDestNode != NULL);
#ifndef NO_DEBUG_MESSAGES
perf.Stop();