summaryrefslogtreecommitdiff
path: root/src/rail_gui.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2010-04-14 20:28:37 +0000
committerfrosch <frosch@openttd.org>2010-04-14 20:28:37 +0000
commit0f656010c81ac31be8fd59280b427138dce411ff (patch)
tree15ba6245a31a82ddd678fb98bf2247be3ac4beb9 /src/rail_gui.cpp
parent1177092da650ff539c1d4933737e0bf42a417771 (diff)
downloadopenttd-0f656010c81ac31be8fd59280b427138dce411ff.tar.xz
(svn r19637) -Codechange: Pass complete TransportType to CmdBuildTunnel.
Diffstat (limited to 'src/rail_gui.cpp')
-rw-r--r--src/rail_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp
index 1d9302872..81c95e5a1 100644
--- a/src/rail_gui.cpp
+++ b/src/rail_gui.cpp
@@ -277,7 +277,7 @@ void CcBuildRailTunnel(const CommandCost &result, TileIndex tile, uint32 p1, uin
static void PlaceRail_Tunnel(TileIndex tile)
{
- DoCommandP(tile, _cur_railtype, 0, CMD_BUILD_TUNNEL | CMD_MSG(STR_ERROR_CAN_T_BUILD_TUNNEL_HERE), CcBuildRailTunnel);
+ DoCommandP(tile, _cur_railtype | (TRANSPORT_RAIL << 8), 0, CMD_BUILD_TUNNEL | CMD_MSG(STR_ERROR_CAN_T_BUILD_TUNNEL_HERE), CcBuildRailTunnel);
}
static void PlaceRail_ConvertRail(TileIndex tile)
@@ -821,7 +821,7 @@ struct BuildRailToolbarWindow : Window {
virtual void OnPlacePresize(Point pt, TileIndex tile)
{
- DoCommand(tile, _cur_railtype, 0, DC_AUTO, CMD_BUILD_TUNNEL);
+ DoCommand(tile, _cur_railtype | (TRANSPORT_RAIL << 8), 0, DC_AUTO, CMD_BUILD_TUNNEL);
VpSetPresizeRange(tile, _build_tunnel_endtile == 0 ? tile : _build_tunnel_endtile);
}