Mercurial > hg > openttd
changeset 17007:bc1b37ab8edc draft
(svn r21743) -Fix [FS#4386]: coast tiles weren't drawn under bridges
author | rubidium <rubidium@openttd.org> |
---|---|
date | Sun, 09 Jan 2011 12:17:52 +0000 |
parents | 60f4773940c6 |
children | 66df555d2b2a |
files | src/tunnelbridge_cmd.cpp |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/tunnelbridge_cmd.cpp +++ b/src/tunnelbridge_cmd.cpp @@ -39,6 +39,7 @@ #include "company_base.h" #include "newgrf_railtype.h" #include "object_base.h" +#include "water.h" #include "table/sprites.h" #include "table/strings.h" @@ -1104,7 +1105,12 @@ } if (!ice) { - DrawClearLandTile(ti, 3); + TileIndex next = ti->tile + TileOffsByDiagDir(tunnelbridge_direction); + if (ti->tileh != SLOPE_FLAT && ti->z == 0 && HasTileWaterClass(next) && GetWaterClass(next) == WATER_CLASS_SEA) { + DrawShoreTile(ti->tileh); + } else { + DrawClearLandTile(ti, 3); + } } else { DrawGroundSprite(SPR_FLAT_SNOW_DESERT_TILE + SlopeToSpriteOffset(ti->tileh), PAL_NONE); }