mirror of https://github.com/OpenTTD/OpenTTD
(svn r27746) -Fix [FS#6538]: PR_CLEAR_ROAD refers to cost per roadbit. Removing secondary roadtypes from bridges was too cheap. (JGR)
parent
7d6d3897db
commit
7f1c176706
|
@ -224,7 +224,7 @@ static CommandCost RemoveRoad(TileIndex tile, DoCommandFlag flags, RoadBits piec
|
||||||
TileIndex other_end = GetOtherTunnelBridgeEnd(tile);
|
TileIndex other_end = GetOtherTunnelBridgeEnd(tile);
|
||||||
/* Pay for *every* tile of the bridge or tunnel */
|
/* Pay for *every* tile of the bridge or tunnel */
|
||||||
uint len = GetTunnelBridgeLength(other_end, tile) + 2;
|
uint len = GetTunnelBridgeLength(other_end, tile) + 2;
|
||||||
cost.AddCost(len * _price[PR_CLEAR_ROAD]);
|
cost.AddCost(len * 2 * _price[PR_CLEAR_ROAD]);
|
||||||
if (flags & DC_EXEC) {
|
if (flags & DC_EXEC) {
|
||||||
Company *c = Company::GetIfValid(GetRoadOwner(tile, rt));
|
Company *c = Company::GetIfValid(GetRoadOwner(tile, rt));
|
||||||
if (c != NULL) {
|
if (c != NULL) {
|
||||||
|
|
Loading…
Reference in New Issue