diff options
author | rubidium <rubidium@openttd.org> | 2007-07-16 21:00:40 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-07-16 21:00:40 +0000 |
commit | a58a18bb5065ea09932bdb2d78ea41d314333e70 (patch) | |
tree | 738ab2f5857d1a88e75db7dd1cfdac8152966060 /src/openttd.cpp | |
parent | 3cf51c61885ef4acc60e4e193ab06a4038389c38 (diff) | |
download | openttd-a58a18bb5065ea09932bdb2d78ea41d314333e70.tar.xz |
(svn r10593) -Fix [FS#1038]: one could not remove locks that were build in a (very) old version of OpenTTD.
Diffstat (limited to 'src/openttd.cpp')
-rw-r--r-- | src/openttd.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp index 931651577..b57357ac8 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -2086,6 +2086,16 @@ bool AfterLoadGame() FOR_ALL_INDUSTRIES(i) i->founder = OWNER_NONE; } + if (CheckSavegameVersion(72)) { + /* Locks/shiplifts in very old savegames had OWNER_WATER as owner */ + for (TileIndex t = 0; t < MapSize(); t++) { + if (IsTileType(t, MP_WATER) && GetWaterTileType(t) == WATER_TILE_LOCK && + GetTileOwner(t) == OWNER_WATER) { + SetTileOwner(t, OWNER_NONE); + } + } + } + /* Recalculate */ Group *g; FOR_ALL_GROUPS(g) { |