summaryrefslogtreecommitdiff
path: root/src/tunnelbridge_cmd.cpp
diff options
context:
space:
mode:
authormaedhros <maedhros@openttd.org>2007-10-14 21:20:12 +0000
committermaedhros <maedhros@openttd.org>2007-10-14 21:20:12 +0000
commit675a826601e74390673317bfbbada37dc8d57ec2 (patch)
treee736c50ab51b5772162a0b2e2bdc1fdc07aae36d /src/tunnelbridge_cmd.cpp
parent42761739228fea45f3c561327cae3c609c4f34a1 (diff)
downloadopenttd-675a826601e74390673317bfbbada37dc8d57ec2.tar.xz
(svn r11265) -Feature: Make more advanced rail types more expensive to build.
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 255def8a9..8a3ea905e 100644
--- a/src/tunnelbridge_cmd.cpp
+++ b/src/tunnelbridge_cmd.cpp
@@ -773,7 +773,7 @@ CommandCost DoConvertTunnelBridgeRail(TileIndex tile, RailType totype, bool exec
VehicleFromPos(endtile, &endtile, UpdateTrainPowerProc);
}
- return CommandCost((length + 1) * (_price.build_rail >> 1));
+ return CommandCost((length + 1) * (RailBuildCost(totype) / 2));
} else if (IsBridge(tile) && GetBridgeTransportType(tile) == TRANSPORT_RAIL) {
TileIndex endtile = GetOtherBridgeEnd(tile);
byte bridge_height = GetBridgeHeight(tile);
@@ -805,7 +805,7 @@ CommandCost DoConvertTunnelBridgeRail(TileIndex tile, RailType totype, bool exec
}
}
- return CommandCost((DistanceManhattan(tile, endtile) + 1) * (_price.build_rail >> 1));
+ return CommandCost((DistanceManhattan(tile, endtile) + 1) * (RailBuildCost(totype) / 2));
} else {
return CMD_ERROR;
}