Fix limit train lookahead to signal aspect within signalled tunnel/bridges

This commit is contained in:
Jonathan G Rennison
2022-06-22 00:24:13 +01:00
parent 387e646439
commit b6e099121a
2 changed files with 2 additions and 0 deletions

View File

@@ -999,6 +999,7 @@ void SetTrainReservationLookaheadEnd(Train *v)
int32 threshold = v->lookahead->current_position + 24;
uint8 known_signals_ahead = 1;
for (const TrainReservationLookAheadItem &item : v->lookahead->items) {
if (item.end >= v->lookahead->reservation_end_position) break;
if (item.type == TRLIT_SIGNAL) {
if (item.start <= threshold) {
/* Signal is within visual range */