diff options
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r-- | src/station_cmd.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index baa3392c3..68eec417f 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -1031,6 +1031,9 @@ CommandCost CmdBuildRailroadStation(TileIndex tile_org, uint32 flags, uint32 p1, if (v != NULL) { FreeTrainTrackReservation(v); *affected_vehicles.Append() = v; + if (IsRailwayStationTile(v->tile)) SetRailwayStationPlatformReservation(v->tile, TrackdirToExitdir(GetVehicleTrackdir(v)), false); + for (; v->Next() != NULL; v = v->Next()) ; + if (IsRailwayStationTile(v->tile)) SetRailwayStationPlatformReservation(v->tile, TrackdirToExitdir(ReverseTrackdir(GetVehicleTrackdir(v))), false); } } @@ -1059,7 +1062,11 @@ CommandCost CmdBuildRailroadStation(TileIndex tile_org, uint32 flags, uint32 p1, } while (--numtracks); for (uint i = 0; i < affected_vehicles.Length(); ++i) { - TryPathReserve(affected_vehicles[i], true); + Vehicle *v = affected_vehicles[i]; + if (IsRailwayStationTile(v->tile)) SetRailwayStationPlatformReservation(v->tile, TrackdirToExitdir(GetVehicleTrackdir(v)), true); + TryPathReserve(v, true); + for (; v->Next() != NULL; v = v->Next()) ; + if (IsRailwayStationTile(v->tile)) SetRailwayStationPlatformReservation(v->tile, TrackdirToExitdir(ReverseTrackdir(GetVehicleTrackdir(v))), true); } st->MarkTilesDirty(false); |