summaryrefslogtreecommitdiff
path: root/yapf
diff options
context:
space:
mode:
authorKUDr <KUDr@openttd.org>2006-06-07 21:18:08 +0000
committerKUDr <KUDr@openttd.org>2006-06-07 21:18:08 +0000
commite811c6a8681a9bb65793a9895dc8a5f4b1d4b755 (patch)
treeb987fbd10a1640ef7a82db9fc4afd1a68a38a490 /yapf
parent68372f4c16825f2dad27d61184b37781d65a11a8 (diff)
downloadopenttd-e811c6a8681a9bb65793a9895dc8a5f4b1d4b755.tar.xz
(svn r5163) - CodeChange: [YAPF] "treat first red two-way signal as dead end" is not applied if train didn't pass choice.
It allows pathfinder to plan route through first red two-way signal if the train has no other choice than to pass it.
Diffstat (limited to 'yapf')
-rw-r--r--yapf/yapf_costrail.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/yapf/yapf_costrail.hpp b/yapf/yapf_costrail.hpp
index ab708410d..b87793c60 100644
--- a/yapf/yapf_costrail.hpp
+++ b/yapf/yapf_costrail.hpp
@@ -106,7 +106,7 @@ public:
} else {
// we have a red signal in our direction
// was it first signal which is two-way?
- if (Yapf().TreatFirstRedTwoWaySignalAsEOL() && has_signal_against && n.m_num_signals_passed == 0) {
+ if (Yapf().TreatFirstRedTwoWaySignalAsEOL() && n.flags_u.flags_s.m_choice_seen && has_signal_against && n.m_num_signals_passed == 0) {
// yes, the first signal is two-way red signal => DEAD END
n.m_segment->flags_u.flags_s.m_end_of_line = true;
return -1;