summaryrefslogtreecommitdiff
path: root/yapf/yapf_rail.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'yapf/yapf_rail.cpp')
-rw-r--r--yapf/yapf_rail.cpp5
1 files changed, 3 insertions, 2 deletions
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