diff options
author | rubidium <rubidium@openttd.org> | 2011-01-09 12:17:52 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2011-01-09 12:17:52 +0000 |
commit | c8a4d122c58519b594837f1b9a21283817a38ce3 (patch) | |
tree | c516427dac857bcbe3a55444967ddee4cfc50488 | |
parent | 2da2b57631fc81320e8ef701a7cc4f221c47e5b8 (diff) | |
download | openttd-c8a4d122c58519b594837f1b9a21283817a38ce3.tar.xz |
(svn r21743) -Fix [FS#4386]: coast tiles weren't drawn under bridges
-rw-r--r-- | src/tunnelbridge_cmd.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp index f47708ce7..9b6bb8350 100644 --- 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 @@ static void DrawTile_TunnelBridge(TileInfo *ti) } 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); } |