diff options
author | rubidium <rubidium@openttd.org> | 2008-07-25 10:10:11 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-07-25 10:10:11 +0000 |
commit | 80daf62d9503fe3ebf23fa4315609f039e200364 (patch) | |
tree | 62bbe986f62ad0f2f5a5e9963b13359d9f289c1a /src | |
parent | fae2695854617b2473f2397d55923b5b404fbaff (diff) | |
download | openttd-80daf62d9503fe3ebf23fa4315609f039e200364.tar.xz |
(svn r13822) -Fix [FS#2166]: building through the wrong side of a drive through station was allowed.
Diffstat (limited to 'src')
-rw-r--r-- | src/road_cmd.cpp | 6 |
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; |