diff options
author | rubidium <rubidium@openttd.org> | 2013-07-14 09:21:46 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2013-07-14 09:21:46 +0000 |
commit | f178899609bb30284e40b1a3f5246ce44cfbf569 (patch) | |
tree | f665735517f7f1a0238a07a700cb9f780a6362c0 /src/pathfinder/yapf/yapf_costrail.hpp | |
parent | 740643f2b273e98b11f76815efe9f454b3b7e76d (diff) | |
download | openttd-f178899609bb30284e40b1a3f5246ce44cfbf569.tar.xz |
(svn r25609) -Fix [FS#5216]: under certain circumstances a track type change would make the end-of-line-is-red setting ineffective
Diffstat (limited to 'src/pathfinder/yapf/yapf_costrail.hpp')
-rw-r--r-- | src/pathfinder/yapf/yapf_costrail.hpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pathfinder/yapf/yapf_costrail.hpp b/src/pathfinder/yapf/yapf_costrail.hpp index 44647443b..c6080f2a1 100644 --- a/src/pathfinder/yapf/yapf_costrail.hpp +++ b/src/pathfinder/yapf/yapf_costrail.hpp @@ -212,7 +212,8 @@ public: /* we have a red signal in our direction * was it first signal which is two-way? */ if (!IsPbsSignal(sig_type) && 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 */ + /* yes, the first signal is two-way red signal => DEAD END. Prune this branch... */ + Yapf().PruneIntermediateNodeBranch(); n.m_segment->m_end_segment_reason |= ESRB_DEAD_END; Yapf().m_stopped_on_first_two_way_signal = true; return -1; |