From dfba33819b68aa04c96f60666bf436e6474765dd Mon Sep 17 00:00:00 2001 From: smatz Date: Sat, 8 Dec 2007 19:53:30 +0000 Subject: (svn r11603) -Fix [FS#1481]: make price for railtype conversion more realistic --- src/tunnelbridge_cmd.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/tunnelbridge_cmd.cpp') 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; } -- cgit v1.2.3-70-g09d2