Fix wrong calculation of road tunnel infrastructure counts.

This commit is contained in:
Jonathan G Rennison
2017-02-22 02:46:42 +00:00
parent 079a5a66da
commit c6fa52f1f1

View File

@@ -1690,7 +1690,7 @@ static TrackStatus GetTileTrackStatus_TunnelBridge(TileIndex tile, TransportType
static void UpdateRoadTunnelBridgeInfrastructure(TileIndex begin, TileIndex end, bool add) { static void UpdateRoadTunnelBridgeInfrastructure(TileIndex begin, TileIndex end, bool add) {
/* A full diagonal road has two road bits. */ /* A full diagonal road has two road bits. */
const uint middle_len = 2 * GetTunnelBridgeLength(begin, end) * TUNNELBRIDGE_TRACKBIT_FACTOR; const uint middle_len = 2 * GetTunnelBridgeLength(begin, end) * TUNNELBRIDGE_TRACKBIT_FACTOR;
const uint len = middle_len + (2 * TUNNELBRIDGE_TRACKBIT_FACTOR); const uint len = middle_len + (4 * TUNNELBRIDGE_TRACKBIT_FACTOR);
/* Iterate all present road types as each can have a different owner. */ /* Iterate all present road types as each can have a different owner. */
RoadType rt; RoadType rt;