Mercurial > hg > openttd
changeset 17256:a0aa13a12f16 draft
(svn r21996) -Fix [FS#4472]: [YAPF] Under some circumstances vehicles could be lost
author | rubidium <rubidium@openttd.org> |
---|---|
date | Sun, 06 Feb 2011 15:01:52 +0000 |
parents | de0ad7ca4b89 |
children | d8adc59b7654 |
files | src/pathfinder/yapf/yapf_base.hpp |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/pathfinder/yapf/yapf_base.hpp +++ b/src/pathfinder/yapf/yapf_base.hpp @@ -128,6 +128,7 @@ #endif /* !NO_DEBUG_MESSAGES */ Yapf().PfSetStartupNodes(); + bool bDestFound = true; while (true) { m_num_steps++; @@ -146,12 +147,12 @@ 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();