diff options
author | rubidium <rubidium@openttd.org> | 2008-06-11 14:51:31 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-06-11 14:51:31 +0000 |
commit | f858e5bbf42ca42939067a305978d9c4c9141288 (patch) | |
tree | 1d549640b590555ee7f95e7e17fd1fdadee72422 /src | |
parent | 93fb5bc63dab2eabd0aa75e45f1eb1ce1fecae85 (diff) | |
download | openttd-f858e5bbf42ca42939067a305978d9c4c9141288.tar.xz |
(svn r13468) -Fix: make aqueducts a little more expensive than normal bridges and disable terraforming of aqueduct bridgeheads; one can't terraform normal canal tiles either.
Diffstat (limited to 'src')
-rw-r--r-- | src/tunnelbridge_cmd.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp index 1915c1454..f26bd7c58 100644 --- a/src/tunnelbridge_cmd.cpp +++ b/src/tunnelbridge_cmd.cpp @@ -456,6 +456,9 @@ not_valid_below:; bridge_len = CalcBridgeLenCostFactor(bridge_len); cost.AddCost((int64)bridge_len * _price.build_bridge * GetBridgeSpec(bridge_type)->price >> 8); + + /* Aqueducts are a little more expensive. */ + if (transport_type == TRANSPORT_WATER) cost.AddCost((int64)bridge_len * _price.clear_water); } return cost; @@ -1429,7 +1432,7 @@ static VehicleEnterTileStatus VehicleEnter_TunnelBridge(Vehicle *v, TileIndex ti static CommandCost TerraformTile_TunnelBridge(TileIndex tile, uint32 flags, uint z_new, Slope tileh_new) { - if (_settings_game.construction.build_on_slopes && AutoslopeEnabled() && IsBridge(tile)) { + if (_settings_game.construction.build_on_slopes && AutoslopeEnabled() && IsBridge(tile) && GetTunnelBridgeTransportType(tile) != TRANSPORT_WATER) { DiagDirection direction = GetTunnelBridgeDirection(tile); Axis axis = DiagDirToAxis(direction); CommandCost res; |