summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2010-11-29 17:26:47 +0000
committerfrosch <frosch@openttd.org>2010-11-29 17:26:47 +0000
commitf2c84e01206f355c46d7693d10cc1a6f16022d08 (patch)
treed827a5ed7e0e0e9dd9d99bdefa4475d506d7fd66 /src
parentc0312e101108eda3815891b234ffe8c7f29ac663 (diff)
downloadopenttd-f2c84e01206f355c46d7693d10cc1a6f16022d08.tar.xz
(svn r21353) -Fix (r19056)[FS#4277]: New railtypes with overlays did not use the shore sprites as groundtiles for three-corner-raised slopes (at shore).
Diffstat (limited to 'src')
-rw-r--r--src/rail_cmd.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp
index 11633e061..ca56de8af 100644
--- a/src/rail_cmd.cpp
+++ b/src/rail_cmd.cpp
@@ -1878,10 +1878,12 @@ static void DrawTrackBitsOverlay(TileInfo *ti, TrackBits track, const RailtypeIn
/* DrawFoundation modifies ti */
/* Draw ground */
- if (track == TRACK_BIT_NONE && rgt == RAIL_GROUND_WATER) {
- if (IsSteepSlope(ti->tileh)) {
+ if (rgt == RAIL_GROUND_WATER) {
+ if (track != TRACK_BIT_NONE || IsSteepSlope(ti->tileh)) {
+ /* three-corner-raised slope or steep slope with track on upper part */
DrawShoreTile(ti->tileh);
} else {
+ /* single-corner-raised slope with track on upper part */
DrawGroundSprite(SPR_FLAT_WATER_TILE, PAL_NONE);
}
} else {