summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2008-01-24 14:57:43 +0000
committerfrosch <frosch@openttd.org>2008-01-24 14:57:43 +0000
commitda754951f1895290d965544bac13219f38b51136 (patch)
tree8db0e05be12ab6a6bb9cadfe3d1f4bc3838f070d /src
parent79aa7247c06c08cefed039c37e858f0af0ad6de8 (diff)
downloadopenttd-da754951f1895290d965544bac13219f38b51136.tar.xz
(svn r11974) -Fix [FS#1684]: Shore and sea tiles under bridges were converted to canals in old savegames.
Diffstat (limited to 'src')
-rw-r--r--src/openttd.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp
index 7681a27d7..736acb978 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -1710,7 +1710,15 @@ bool AfterLoadGame()
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);