mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
Fix reservation error when a reserve through signal was the last tile
When there were no junctions earlier in the reservation
This commit is contained in:
parent
a451b76c45
commit
5b5fbaa476
@ -3768,7 +3768,7 @@ static PBSTileInfo ExtendTrainReservation(const Train *v, const PBSTileInfo &ori
|
||||
if (IsSafeWaitingPosition(v, tile, cur_td, true, _settings_game.pf.forbid_90_deg)) {
|
||||
PBSWaitingPositionRestrictedSignalInfo restricted_signal_info;
|
||||
bool wp_free = IsWaitingPositionFree(v, tile, cur_td, _settings_game.pf.forbid_90_deg, &restricted_signal_info);
|
||||
if (!(wp_free && TryReserveRailTrack(tile, TrackdirToTrack(cur_td)))) break;
|
||||
if (!(wp_free && TryReserveRailTrackdir(tile, cur_td))) break;
|
||||
/* Safe position is all good, path valid and okay. */
|
||||
if (restricted_signal_info.tile != INVALID_TILE) {
|
||||
const TraceRestrictProgram *prog = GetExistingTraceRestrictProgram(restricted_signal_info.tile, TrackdirToTrack(restricted_signal_info.trackdir));
|
||||
|
Loading…
Reference in New Issue
Block a user