From 5b5fbaa476e8e3ec444f5a550a2eaaa90a572e41 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Sun, 26 Jun 2022 16:28:23 +0100 Subject: [PATCH] Fix reservation error when a reserve through signal was the last tile When there were no junctions earlier in the reservation --- src/train_cmd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index d52c05458c..827234824b 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -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));