From 3a706b0f2d6775d72d36f430d406f5892db042e4 Mon Sep 17 00:00:00 2001 From: rubidium Date: Fri, 25 Jul 2008 10:10:11 +0000 Subject: [PATCH] (svn r13822) -Fix [FS#2166]: building through the wrong side of a drive through station was allowed. --- src/road_cmd.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/road_cmd.cpp b/src/road_cmd.cpp index 4914ad1f83..be2e613390 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;