summaryrefslogtreecommitdiff
path: root/src/road_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/road_cmd.cpp')
-rw-r--r--src/road_cmd.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/road_cmd.cpp b/src/road_cmd.cpp
index 4914ad1f8..be2e61339 100644
--- a/src/road_cmd.cpp
+++ b/src/road_cmd.cpp
@@ -570,7 +570,11 @@ CommandCost CmdBuildRoad(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
}
case MP_STATION:
- if (!IsDriveThroughStopTile(tile)) return CMD_ERROR;
+ if (IsDriveThroughStopTile(tile)) {
+ if (pieces & ~AxisToRoadBits(DiagDirToAxis(GetRoadStopDir(tile)))) goto do_clear;
+ } else {
+ if (pieces & ~DiagDirToRoadBits(GetRoadStopDir(tile))) goto do_clear;
+ }
if (HasTileRoadType(tile, rt)) return_cmd_error(STR_1007_ALREADY_BUILT);
break;