Changeset - r3979:863700053ddc
[Not reviewed]
master
0 1 0
KUDr - 18 years ago 2006-06-07 21:18:08
kudr@openttd.org
(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.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
yapf/yapf_costrail.hpp
Show inline comments
 
@@ -103,13 +103,13 @@ public:
 
				if (sig_state != SIGNAL_STATE_RED) {
 
					// green signal
 
					n.flags_u.flags_s.m_last_signal_was_red = false;
 
				} 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;
 
					}
 
					SignalType sig_type = GetSignalType(tile);
 
					n.m_last_red_signal_type = sig_type;
0 comments (0 inline, 0 general)