diff --git a/src/pathfinder/follow_track.hpp b/src/pathfinder/follow_track.hpp index 2af15089dd..51feff2888 100644 --- a/src/pathfinder/follow_track.hpp +++ b/src/pathfinder/follow_track.hpp @@ -331,7 +331,7 @@ protected: } /* rail transport is possible only on compatible rail types */ - if (IsRailTT()) { + if (IsRailTT() && this->railtypes.Any()) { RailType rail_type = GetTileRailType(this->new_tile); if (!this->railtypes.Test(rail_type)) { /* incompatible rail type */ diff --git a/src/pbs.cpp b/src/pbs.cpp index 5181ff9549..8537c17aa5 100644 --- a/src/pbs.cpp +++ b/src/pbs.cpp @@ -436,8 +436,9 @@ bool IsWaitingPositionFree(const Train *v, TileIndex tile, Trackdir trackdir, bo if (IsRailDepotTile(tile)) return true; if (IsTileType(tile, MP_RAILWAY) && HasSignalOnTrackdir(tile, trackdir) && !IsPbsSignal(GetSignalType(tile, track))) return true; - /* Check the next tile, if it's a PBS signal, it has to be free as well. */ - CFollowTrackRail ft(v, GetRailTypeInfo(v->railtype)->compatible_railtypes); + /* Check the next tile, it has to be free as well. Do not filter for compatible railtypes + * to make sure we never accidentally join up reservations. */ + CFollowTrackRail ft(v, RailTypes{}); if (!ft.Follow(tile, trackdir)) return true;