Ensure correct rail type used in FollowTrainReservation

This commit is contained in:
Jonathan G Rennison
2019-03-07 22:58:05 +00:00
parent 60c2f0ebc8
commit e8b45f0ae4

View File

@@ -406,7 +406,7 @@ Train *GetTrainForReservation(TileIndex tile, Track track)
assert_msg_tile(HasReservedTracks(tile, TrackToTrackBits(track)), tile, "track: %u", track); assert_msg_tile(HasReservedTracks(tile, TrackToTrackBits(track)), tile, "track: %u", track);
Trackdir trackdir = TrackToTrackdir(track); Trackdir trackdir = TrackToTrackdir(track);
RailTypes rts = GetRailTypeInfo(GetTileRailType(tile))->compatible_railtypes; RailTypes rts = GetRailTypeInfo(GetTileRailTypeByTrack(tile, track))->compatible_railtypes;
/* Follow the path from tile to both ends, one of the end tiles should /* Follow the path from tile to both ends, one of the end tiles should
* have a train on it. We need FollowReservation to ignore one-way signals * have a train on it. We need FollowReservation to ignore one-way signals