From 1f360e97a1dd02ce75760d380d13a26638111b5b Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Tue, 16 Mar 2021 03:07:16 +0000 Subject: [PATCH] Fix building over existing stations bypassing realistic braking moving train restrictions --- src/station_cmd.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index f6264af111..cc44ea6c5b 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -952,6 +952,10 @@ static CommandCost CheckFlatLandRailStation(TileArea tile_area, DoCommandFlag fl } else if (*station != st) { return_cmd_error(STR_ERROR_ADJOINS_MORE_THAN_ONE_EXISTING); } + if (_settings_game.vehicle.train_braking_model == TBM_REALISTIC && HasStationReservation(tile_cur)) { + CommandCost ret = CheckTrainReservationPreventsTrackModification(tile_cur, GetRailStationTrack(tile_cur)); + if (ret.Failed()) return ret; + } } } else { /* Rail type is only valid when building a railway station; if station to