(svn r22700) -Fix [FS#4680]: cost of changing bridge type is undercalculated when adding road types as well (based on patch by adf88)

This commit is contained in:
rubidium
2011-07-30 14:10:12 +00:00
parent cfc2c5db42
commit 7b418502ab
2 changed files with 6 additions and 2 deletions

View File

@@ -474,7 +474,7 @@ CommandCost CmdBuildBridge(TileIndex end_tile, DoCommandFlag flags, uint32 p1, u
bridge_len += 2; // begin and end tiles/ramps
switch (transport_type) {
case TRANSPORT_ROAD: cost.AddCost(bridge_len * _price[PR_BUILD_ROAD] * 2); break;
case TRANSPORT_ROAD: cost.AddCost(bridge_len * _price[PR_BUILD_ROAD] * 2 * CountBits(roadtypes)); break;
case TRANSPORT_RAIL: cost.AddCost(bridge_len * RailBuildCost(railtype)); break;
default: break;
}