From af2a4cecde8aeae4af2cc22b81a41b206fa9bca0 Mon Sep 17 00:00:00 2001 From: KUDr Date: Fri, 29 Dec 2006 23:06:00 +0000 Subject: (svn r7628) -Fix: [YAPF] suppress 'Train is lost' message if pathfinding ended on the first two-way red signal due to yapf.rail_firstred_twoway_eol option. --- yapf/yapf_rail.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'yapf/yapf_rail.cpp') diff --git a/yapf/yapf_rail.cpp b/yapf/yapf_rail.cpp index d7edfaa02..1461b9402 100644 --- a/yapf/yapf_rail.cpp +++ b/yapf/yapf_rail.cpp @@ -118,9 +118,10 @@ public: // find the best path bool path_found = Yapf().FindPath(v); - if (!path_found && path_not_found != NULL) { + if (path_not_found != NULL) { // tell controller that the path was only 'guessed' - *path_not_found = !path_found; + // treat the path as found if stopped on the first two way signal(s) + *path_not_found = !(path_found || Yapf().m_stopped_on_first_two_way_signal); } // if path not found - return INVALID_TRACKDIR -- cgit v1.2.3-70-g09d2