Viewport map: Show bridges and tunnels in rail type colour in routes mode

See: #522
This commit is contained in:
Jonathan G Rennison
2023-05-24 20:04:32 +01:00
parent 9cb992ab14
commit d29cec53e0

View File

@@ -3435,6 +3435,8 @@ static void ViewportMapDrawBridgeTunnel(Viewport * const vp, const TunnelBridgeT
if (vp->map_type == VPMT_OWNER && _settings_client.gui.use_owner_colour_for_tunnelbridge && o < MAX_COMPANIES) {
colour = _legend_land_owners[_company_to_list_pos[o]].colour;
colour = is_tunnel ? _darken_colour[colour] : _lighten_colour[colour];
} else if (vp->map_type == VPMT_ROUTES && IsRailTunnelBridgeTile(tile)) {
colour = GetRailTypeInfo(GetRailType(tile))->map_colour;
} else {
colour = is_tunnel ? PC_BLACK : PC_VERY_LIGHT_YELLOW;
}