summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorterkhen <terkhen@openttd.org>2010-02-24 22:40:43 +0000
committerterkhen <terkhen@openttd.org>2010-02-24 22:40:43 +0000
commitba82d7d9a5625033fd649f09591dec98da6885b9 (patch)
tree877e0667bafffac5b7e81e8ae7621b1e41d6f291 /src
parenta4a66ec1aa2a7772ed174b8dcc1905e9bc5dd02d (diff)
downloadopenttd-ba82d7d9a5625033fd649f09591dec98da6885b9.tar.xz
(svn r19232) -Fix (r19231): Forbid overbuilding drive-through stops using a different orientation.
Diffstat (limited to 'src')
-rw-r--r--src/station_cmd.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index c30f4108b..e7ed6e827 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -832,6 +832,10 @@ static CommandCost CheckFlatLandRoadStop(TileArea tile_area, DoCommandFlag flags
HasBit(rts, ROADTYPE_TRAM) != HasBit(GetRoadTypes(cur_tile), ROADTYPE_TRAM)) {
return ClearTile_Station(cur_tile, DC_AUTO); // Get error message.
}
+ /* Drive-through station in the wrong direction. */
+ if (is_drive_through && IsDriveThroughStopTile(cur_tile) && DiagDirToAxis(GetRoadStopDir(cur_tile)) != axis){
+ return_cmd_error(STR_ERROR_DRIVE_THROUGH_DIRECTION);
+ }
StationID st = GetStationIndex(cur_tile);
if (*station == INVALID_STATION) {
*station = st;