mirror of https://github.com/OpenTTD/OpenTTD
(svn r21996) -Fix [FS#4472]: [YAPF] Under some circumstances vehicles could be lost
parent
8b2f2c09e5
commit
fd94ed3009
|
@ -128,6 +128,7 @@ public:
|
||||||
#endif /* !NO_DEBUG_MESSAGES */
|
#endif /* !NO_DEBUG_MESSAGES */
|
||||||
|
|
||||||
Yapf().PfSetStartupNodes();
|
Yapf().PfSetStartupNodes();
|
||||||
|
bool bDestFound = true;
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
m_num_steps++;
|
m_num_steps++;
|
||||||
|
@ -146,12 +147,12 @@ public:
|
||||||
m_nodes.PopOpenNode(n->GetKey());
|
m_nodes.PopOpenNode(n->GetKey());
|
||||||
m_nodes.InsertClosedNode(*n);
|
m_nodes.InsertClosedNode(*n);
|
||||||
} else {
|
} else {
|
||||||
m_pBestDestNode = m_pBestIntermediateNode;
|
bDestFound = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool bDestFound = (m_pBestDestNode != NULL) && (m_pBestDestNode != m_pBestIntermediateNode);
|
bDestFound &= (m_pBestDestNode != NULL);
|
||||||
|
|
||||||
#ifndef NO_DEBUG_MESSAGES
|
#ifndef NO_DEBUG_MESSAGES
|
||||||
perf.Stop();
|
perf.Stop();
|
||||||
|
|
Loading…
Reference in New Issue