diff options
author | smatz <smatz@openttd.org> | 2007-12-08 19:53:30 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2007-12-08 19:53:30 +0000 |
commit | dfba33819b68aa04c96f60666bf436e6474765dd (patch) | |
tree | 94c6bceeae9a2d453ac8cce16bd83009b7e5a776 /src/tunnelbridge_cmd.cpp | |
parent | 58b4a981e1912812df844e4c04ea64d9e5435922 (diff) | |
download | openttd-dfba33819b68aa04c96f60666bf436e6474765dd.tar.xz |
(svn r11603) -Fix [FS#1481]: make price for railtype conversion more realistic
Diffstat (limited to 'src/tunnelbridge_cmd.cpp')
-rw-r--r-- | src/tunnelbridge_cmd.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp index e0c1270f3..5c4933b68 100644 --- a/src/tunnelbridge_cmd.cpp +++ b/src/tunnelbridge_cmd.cpp @@ -774,7 +774,7 @@ CommandCost DoConvertTunnelBridgeRail(TileIndex tile, RailType totype, bool exec VehicleFromPos(endtile, &endtile, UpdateTrainPowerProc); } - return CommandCost((length + 1) * (RailBuildCost(totype) / 2)); + return CommandCost((length + 1) * RailConvertCost(GetRailType(tile), totype)); } else if (IsBridge(tile) && GetBridgeTransportType(tile) == TRANSPORT_RAIL) { TileIndex endtile = GetOtherBridgeEnd(tile); byte bridge_height = GetBridgeHeight(tile); @@ -806,7 +806,7 @@ CommandCost DoConvertTunnelBridgeRail(TileIndex tile, RailType totype, bool exec } } - return CommandCost((DistanceManhattan(tile, endtile) + 1) * (RailBuildCost(totype) / 2)); + return CommandCost((DistanceManhattan(tile, endtile) + 1) * RailConvertCost(GetRailType(tile), totype)); } else { return CMD_ERROR; } |