Fix reservation through multiple reserve-through signals after a junction.

This commit is contained in:
Jonathan G Rennison
2016-07-11 22:01:47 +01:00
parent 0ab2abbc23
commit 58817c26e0
3 changed files with 20 additions and 6 deletions

View File

@@ -138,8 +138,8 @@ public:
{
assert(node->m_parent != NULL);
/* We will never pass more than two signals, no need to check for a safe tile. */
if (node->m_parent->m_num_signals_passed >= 2) return;
/* We will never pass more than two non-reserve-through signals, no need to check for a safe tile. */
if (node->m_parent->m_num_signals_passed - node->m_parent->m_num_signals_res_through_passed >= 2) return;
if (!node->IterateTiles(Yapf().GetVehicle(), Yapf(), *this, &CYapfReserveTrack<Types>::FindSafePositionProc)) {
m_res_node = node;