Mercurial > hg > openttd
changeset 8404:9f94795b6c5b draft
(svn r11974) -Fix [FS#1684]: Shore and sea tiles under bridges were converted to canals in old savegames.
author | frosch <frosch@openttd.org> |
---|---|
date | Thu, 24 Jan 2008 14:57:43 +0000 |
parents | 66aed94d512e |
children | 767804e6f878 |
files | src/openttd.cpp |
diffstat | 1 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -1710,7 +1710,15 @@ if (GB(_m[t].m5, 3, 2) == 0) { MakeClear(t, CLEAR_GRASS, 3); } else { - MakeCanal(t, (GetTileOwner(t) == OWNER_WATER) ? OWNER_NONE : GetTileOwner(t), Random()); + if (GetTileSlope(t, NULL) != SLOPE_FLAT) { + MakeShore(t); + } else { + if (GetTileOwner(t) == OWNER_WATER) { + MakeWater(t); + } else { + MakeCanal(t, GetTileOwner(t), Random()); + } + } } } SetBridgeMiddle(t, axis);