Loading

Paste #pohnqa84v

  1. diff --git a/src/road_cmd.cpp b/src/road_cmd.cpp
  2. index 6075fb1fd..d84b81245 100644
  3. --- a/src/road_cmd.cpp
  4. +++ b/src/road_cmd.cpp
  5. @@ -1395,7 +1395,7 @@ static bool DrawRoadAsSnowDesert(TileIndex tile, Roadside roadside)
  6.   * @param rtid road type to draw catenary for
  7.   * @param rb   the roadbits for the tram
  8.   */
  9. -void DrawRoadTypeCatenary(const TileInfo *ti, RoadTypeIdentifier rtid, RoadBits rb)
  10. +void DrawRoadTypeCatenary(const TileInfo *ti, RoadTypeIdentifier rtid, RoadBits rb, RoadType rt)
  11.  {
  12.     /* Don't draw the catenary under a low bridge */
  13.     if (IsBridgeAbove(ti->tile) && !IsTransparencySet(TO_CATENARY)) {
  14. @@ -1438,8 +1438,8 @@ void DrawRoadTypeCatenary(const TileInfo *ti, RoadTypeIdentifier rtid, RoadBits
  15.         front = SPR_TRAMWAY_BASE + _road_frontwire_sprites_1[rb];
  16.     }
  17.  
  18. -   if (back != 0) AddSortableSpriteToDraw(back,  PAL_NONE, ti->x, ti->y, 16, 16, TILE_HEIGHT + BB_HEIGHT_UNDER_BRIDGE, ti->z, IsTransparencySet(TO_CATENARY));
  19. -   if (front != 0) AddSortableSpriteToDraw(front, PAL_NONE, ti->x, ti->y, 16, 16, TILE_HEIGHT + BB_HEIGHT_UNDER_BRIDGE, ti->z, IsTransparencySet(TO_CATENARY));
  20. +   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));
  21. +   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));
  22.  }
  23.  
  24.  /**
  25. @@ -1476,11 +1476,11 @@ void DrawRoadCatenary(const TileInfo *ti)
  26.     const RoadtypeInfo* tram_rti = rtids.HasTram() ? GetRoadTypeInfo(rtids.tram_identifier) : NULL;
  27.  
  28.     if (road_rti != NULL && HasRoadCatenaryDrawn(rtids.road_identifier)) {
  29. -       DrawRoadTypeCatenary(ti, rtids.road_identifier, road);
  30. +       DrawRoadTypeCatenary(ti, rtids.road_identifier, road, ROADTYPE_ROAD);
  31.     }
  32.  
  33.     if (tram_rti != NULL && HasRoadCatenaryDrawn(rtids.tram_identifier)) {
  34. -       DrawRoadTypeCatenary(ti, rtids.tram_identifier, tram);
  35. +       DrawRoadTypeCatenary(ti, rtids.tram_identifier, tram, ROADTYPE_TRAM);
  36.     }
  37.  }
  38.  
  39. @@ -1690,7 +1690,7 @@ static void DrawTile_Road(TileInfo *ti)
  40.                     if (ground != 0) DrawGroundSprite(ground + axis, PAL_NONE);
  41.                 }
  42.             }
  43. -  
  44. +
  45.             /* Draw tram overlay */
  46.             if (tram_rti != NULL) {
  47.                 if (tram_rti->UsesOverlay()) {

Comments