summaryrefslogtreecommitdiff
path: root/src/tunnelbridge_cmd.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2010-03-23 20:29:52 +0000
committerfrosch <frosch@openttd.org>2010-03-23 20:29:52 +0000
commitf45e579923773e05dfc5a35915eee81f6da50914 (patch)
tree5a258f61df9169ff5eda90b15bf4bf57957238f1 /src/tunnelbridge_cmd.cpp
parentfe35a0cacf9da67e11004391d224d63e9bf45145 (diff)
downloadopenttd-f45e579923773e05dfc5a35915eee81f6da50914.tar.xz
(svn r19506) -Fix: Tunnels, bridges and roadstops are build with only one roadtype.
Diffstat (limited to 'src/tunnelbridge_cmd.cpp')
-rw-r--r--src/tunnelbridge_cmd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp
index be686c05c..4bfbf9b1b 100644
--- a/src/tunnelbridge_cmd.cpp
+++ b/src/tunnelbridge_cmd.cpp
@@ -207,7 +207,7 @@ CommandCost CmdBuildBridge(TileIndex end_tile, DoCommandFlag flags, uint32 p1, u
switch (transport_type) {
case TRANSPORT_ROAD:
roadtypes = (RoadTypes)GB(p2, 8, 2);
- if (!AreValidRoadTypes(roadtypes) || !HasRoadTypesAvail(_current_company, roadtypes)) return CMD_ERROR;
+ if (!HasExactlyOneBit(roadtypes) || !HasRoadTypesAvail(_current_company, roadtypes)) return CMD_ERROR;
break;
case TRANSPORT_RAIL:
@@ -487,7 +487,7 @@ CommandCost CmdBuildTunnel(TileIndex start_tile, DoCommandFlag flags, uint32 p1,
if (!ValParamRailtype((RailType)p1)) return CMD_ERROR;
} else {
const RoadTypes rts = (RoadTypes)GB(p1, 0, 2);
- if (!AreValidRoadTypes(rts) || !HasRoadTypesAvail(_current_company, rts)) return CMD_ERROR;
+ if (!HasExactlyOneBit(rts) || !HasRoadTypesAvail(_current_company, rts)) return CMD_ERROR;
}
uint start_z;