diff options
author | frosch <frosch@openttd.org> | 2010-07-11 17:28:19 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2010-07-11 17:28:19 +0000 |
commit | 72ee11a7c63211a3ffe34c834d7ca579d83af1f4 (patch) | |
tree | 6e2d252279d5c894d96fdde8c89d4af7186d4b68 /src/rail_cmd.cpp | |
parent | 19fb8ba6f88d2f684546e93388418f3757d80612 (diff) | |
download | openttd-72ee11a7c63211a3ffe34c834d7ca579d83af1f4.tar.xz |
(svn r20126) -Fix [FS#3883]: Make railtype Terrain Type variable aware of RAIL_GROUND_HALF_SNOW. That is, resolve the sprites for upper and lower part of the foundation independently.
Diffstat (limited to 'src/rail_cmd.cpp')
-rw-r--r-- | src/rail_cmd.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp index 0bcae1a66..ab3444cbd 100644 --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -1791,8 +1791,9 @@ static void DrawTrackFence_WE_2(const TileInfo *ti, SpriteID base_image) static void DrawTrackDetails(const TileInfo *ti, const RailtypeInfo *rti) { - /* Base sprite for track fences. */ - SpriteID base_image = GetCustomRailSprite(rti, ti->tile, RTSG_FENCES); + /* Base sprite for track fences. + * Note: Halftile slopes only have fences on the upper part. */ + SpriteID base_image = GetCustomRailSprite(rti, ti->tile, RTSG_FENCES, IsHalftileSlope(ti->tileh)); if (base_image == 0) base_image = SPR_TRACK_FENCE_FLAT_X; switch (GetRailGroundType(ti->tile)) { @@ -1951,6 +1952,8 @@ static void DrawTrackBitsOverlay(TileInfo *ti, TrackBits track, const RailtypeIn if (IsValidCorner(halftile_corner)) { DrawFoundation(ti, HalftileFoundation(halftile_corner)); + overlay = GetCustomRailSprite(rti, ti->tile, RTSG_OVERLAY, true); + ground = GetCustomRailSprite(rti, ti->tile, RTSG_GROUND, true); /* Draw higher halftile-overlay: Use the sloped sprites with three corners raised. They probably best fit the lightning. */ Slope fake_slope = SlopeWithThreeCornersRaised(OppositeCorner(halftile_corner)); |