diff --git a/src/road_cmd.cpp b/src/road_cmd.cpp index 6075fb1fd..d84b81245 100644 --- a/src/road_cmd.cpp +++ b/src/road_cmd.cpp @@ -1395,7 +1395,7 @@ static bool DrawRoadAsSnowDesert(TileIndex tile, Roadside roadside) * @param rtid road type to draw catenary for * @param rb the roadbits for the tram */ -void DrawRoadTypeCatenary(const TileInfo *ti, RoadTypeIdentifier rtid, RoadBits rb) +void DrawRoadTypeCatenary(const TileInfo *ti, RoadTypeIdentifier rtid, RoadBits rb, RoadType rt) { /* Don't draw the catenary under a low bridge */ if (IsBridgeAbove(ti->tile) && !IsTransparencySet(TO_CATENARY)) { @@ -1438,8 +1438,8 @@ void DrawRoadTypeCatenary(const TileInfo *ti, RoadTypeIdentifier rtid, RoadBits front = SPR_TRAMWAY_BASE + _road_frontwire_sprites_1[rb]; } - if (back != 0) AddSortableSpriteToDraw(back, PAL_NONE, ti->x, ti->y, 16, 16, TILE_HEIGHT + BB_HEIGHT_UNDER_BRIDGE, ti->z, IsTransparencySet(TO_CATENARY)); - if (front != 0) AddSortableSpriteToDraw(front, PAL_NONE, ti->x, ti->y, 16, 16, TILE_HEIGHT + BB_HEIGHT_UNDER_BRIDGE, ti->z, IsTransparencySet(TO_CATENARY)); + if (back != 0) AddSortableSpriteToDraw(back, COMPANY_SPRITE_COLOUR(GetRoadOwner(ti->tile, rt)), ti->x, ti->y, 16, 16, TILE_HEIGHT + BB_HEIGHT_UNDER_BRIDGE, ti->z, IsTransparencySet(TO_CATENARY)); + if (front != 0) AddSortableSpriteToDraw(front, COMPANY_SPRITE_COLOUR(GetRoadOwner(ti->tile, rt)), ti->x, ti->y, 16, 16, TILE_HEIGHT + BB_HEIGHT_UNDER_BRIDGE, ti->z, IsTransparencySet(TO_CATENARY)); } /** @@ -1476,11 +1476,11 @@ void DrawRoadCatenary(const TileInfo *ti) const RoadtypeInfo* tram_rti = rtids.HasTram() ? GetRoadTypeInfo(rtids.tram_identifier) : NULL; if (road_rti != NULL && HasRoadCatenaryDrawn(rtids.road_identifier)) { - DrawRoadTypeCatenary(ti, rtids.road_identifier, road); + DrawRoadTypeCatenary(ti, rtids.road_identifier, road, ROADTYPE_ROAD); } if (tram_rti != NULL && HasRoadCatenaryDrawn(rtids.tram_identifier)) { - DrawRoadTypeCatenary(ti, rtids.tram_identifier, tram); + DrawRoadTypeCatenary(ti, rtids.tram_identifier, tram, ROADTYPE_TRAM); } } @@ -1690,7 +1690,7 @@ static void DrawTile_Road(TileInfo *ti) if (ground != 0) DrawGroundSprite(ground + axis, PAL_NONE); } } - + /* Draw tram overlay */ if (tram_rti != NULL) { if (tram_rti->UsesOverlay()) {