mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 22:28:56 +00:00
(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.
This commit is contained in:
parent
4c52f88ed1
commit
80a36fe5bd
@ -106,7 +106,7 @@ public:
|
|||||||
} else {
|
} else {
|
||||||
// we have a red signal in our direction
|
// we have a red signal in our direction
|
||||||
// was it first signal which is two-way?
|
// 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
|
// yes, the first signal is two-way red signal => DEAD END
|
||||||
n.m_segment->flags_u.flags_s.m_end_of_line = true;
|
n.m_segment->flags_u.flags_s.m_end_of_line = true;
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user