mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-11 13:10:45 +00:00
Fix YAPF not considering signalled tunnel/bridges as safe waiting tiles
In search for any safe waiting tile mode
This commit is contained in:
parent
7152f534e8
commit
9ae96d2fdb
@ -473,7 +473,7 @@ public:
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (n.flags_u.flags_s.m_reverse_pending && entering && IsTunnelBridgeSignalSimulationEntrance(tile)) {
|
if ((TrackFollower::DoTrackMasking() || n.flags_u.flags_s.m_reverse_pending) && entering && IsTunnelBridgeSignalSimulationEntrance(tile)) {
|
||||||
n.m_segment->m_end_segment_reason |= ESRB_SAFE_TILE;
|
n.m_segment->m_end_segment_reason |= ESRB_SAFE_TILE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -774,6 +774,15 @@ no_entry_cost: // jump here at the beginning if the node has no parent (it is th
|
|||||||
end_segment_reason |= ESRB_SAFE_TILE | ESRB_DEAD_END;
|
end_segment_reason |= ESRB_SAFE_TILE | ESRB_DEAD_END;
|
||||||
extra_cost += Yapf().PfGetSettings().rail_lastred_exit_penalty;
|
extra_cost += Yapf().PfGetSettings().rail_lastred_exit_penalty;
|
||||||
}
|
}
|
||||||
|
} else if (TrackFollower::DoTrackMasking() &&
|
||||||
|
_settings_game.pf.back_of_one_way_pbs_waiting_point &&
|
||||||
|
IsTunnelBridgeWithSignalSimulation(next.tile) &&
|
||||||
|
IsTunnelBridgeSignalSimulationExitOnly(next.tile) &&
|
||||||
|
IsTunnelBridgePBS(next.tile) &&
|
||||||
|
TrackdirEntersTunnelBridge(next.tile, next.td)) {
|
||||||
|
/* Possible safe tile, but not so good as it's the back of a signal... */
|
||||||
|
end_segment_reason |= ESRB_SAFE_TILE | ESRB_DEAD_END;
|
||||||
|
extra_cost += Yapf().PfGetSettings().rail_lastred_exit_penalty;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check the next tile for the rail type. */
|
/* Check the next tile for the rail type. */
|
||||||
|
Loading…
Reference in New Issue
Block a user