diff options
author | rubidium <rubidium@openttd.org> | 2008-05-13 12:15:52 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-05-13 12:15:52 +0000 |
commit | e6f96da537ccdce57f9553049c0870f50ff6c14f (patch) | |
tree | 8bb1c4b3dad1f45641ca6be5c6cf625a92facca9 /src | |
parent | d0c79e1164b912644bc0260910bffd88cf2d0cf5 (diff) | |
download | openttd-e6f96da537ccdce57f9553049c0870f50ff6c14f.tar.xz |
(svn r13066) -Fix [FS#2005]: loading of TTDP savegames with rivers in them.
Diffstat (limited to 'src')
-rw-r--r-- | src/oldloader.cpp | 8 | ||||
-rw-r--r-- | src/openttd.cpp | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/oldloader.cpp b/src/oldloader.cpp index d69bccc0a..32dcd3b76 100644 --- a/src/oldloader.cpp +++ b/src/oldloader.cpp @@ -1664,7 +1664,13 @@ static bool LoadOldMain(LoadgameState *ls) * clear it for ourselves and let OTTD's rebuild PBS itself */ _m[i].m4 &= 0xF; /* Only keep the lower four bits; upper four is PBS */ break; - default: break; + + case MP_WATER: + if (GetWaterClass(i) == 3) MakeRiver(i, Random()); + break; + + default: + break; } } diff --git a/src/openttd.cpp b/src/openttd.cpp index ecba066fa..8779f87d4 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -2425,9 +2425,7 @@ bool AfterLoadGame() /* Move river flag and update canals to use water class */ if (IsTileType(t, MP_WATER)) { - if (_m[t].m5 == 2) { - MakeRiver(t, Random()); - } else { + if (GetWaterClass(t) != WATER_CLASS_RIVER) { if (IsWater(t)) { Owner o = GetTileOwner(t); if (o == OWNER_WATER) { |