|
|
@@ -232,7 +232,7 @@ CommandCost CheckBridgeAvailability(BridgeType bridge_type, uint bridge_len, DoC |
|
|
* @param p1 packed start tile coords (~ dx) |
|
|
* @param p2 various bitstuffed elements |
|
|
* - p2 = (bit 0- 7) - bridge type (hi bh) |
|
|
* - p2 = (bit 8-11) - rail type or road types. |
|
|
* - p2 = (bit 8-13) - rail type or road types. |
|
|
* - p2 = (bit 15-16) - transport type. |
|
|
* @param text unused |
|
|
* @return the cost of this operation or an error |
|
|
@@ -259,7 +259,7 @@ CommandCost CmdBuildBridge(TileIndex end_tile, DoCommandFlag flags, uint32 p1, u |
|
|
break; |
|
|
|
|
|
case TRANSPORT_RAIL: |
|
|
railtype = Extract<RailType, 8, 4>(p2); |
|
|
railtype = Extract<RailType, 8, 6>(p2); |
|
|
if (!ValParamRailtype(railtype)) return CMD_ERROR; |
|
|
break; |
|
|
|
|
|
@@ -574,7 +574,7 @@ CommandCost CmdBuildBridge(TileIndex end_tile, DoCommandFlag flags, uint32 p1, u |
|
|
* Build Tunnel. |
|
|
* @param start_tile start tile of tunnel |
|
|
* @param flags type of operation |
|
|
* @param p1 bit 0-3 railtype or roadtypes |
|
|
* @param p1 bit 0-5 railtype or roadtypes |
|
|
* bit 8-9 transport type |
|
|
* @param p2 unused |
|
|
* @param text unused |
|
|
@@ -591,7 +591,7 @@ CommandCost CmdBuildTunnel(TileIndex start_tile, DoCommandFlag flags, uint32 p1, |
|
|
_build_tunnel_endtile = 0; |
|
|
switch (transport_type) { |
|
|
case TRANSPORT_RAIL: |
|
|
railtype = Extract<RailType, 0, 4>(p1); |
|
|
railtype = Extract<RailType, 0, 6>(p1); |
|
|
if (!ValParamRailtype(railtype)) return CMD_ERROR; |
|
|
break; |
|
|
|
|
|
|