diff options
author | Peter Nelson <peter1138@openttd.org> | 2019-03-24 14:54:13 +0000 |
---|---|---|
committer | PeterN <peter@fuzzle.org> | 2019-03-24 15:16:54 +0000 |
commit | f6264e5212575e63f02cb0741e7188ff0d154fac (patch) | |
tree | 4c2cdd915bdbb0aac610c54c89e7a88ddf4b6892 /src | |
parent | 76e77aefada54d1a0dbf7e4b7fb12a9c5f3cb838 (diff) | |
download | openttd-f6264e5212575e63f02cb0741e7188ff0d154fac.tar.xz |
Change: Bump savegame version for tree tile water class conversion.
Diffstat (limited to 'src')
-rw-r--r-- | src/saveload/afterload.cpp | 4 | ||||
-rw-r--r-- | src/saveload/saveload.h | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp index f94063265..6ec4ab67c 100644 --- a/src/saveload/afterload.cpp +++ b/src/saveload/afterload.cpp @@ -3111,8 +3111,8 @@ bool AfterLoadGame() FOR_ALL_INDUSTRIES(ind) if (ind->neutral_station != NULL) ind->neutral_station->industry = ind; } - { - /* Update water class for trees for all current savegame versions. */ + if (IsSavegameVersionBefore(SLV_TREES_WATER_CLASS)) { + /* Update water class for trees. */ for (TileIndex t = 0; t < map_size; t++) { if (IsTileType(t, MP_TREES)) SetWaterClass(t, GetTreeGround(t) == TREE_GROUND_SHORE ? WATER_CLASS_SEA : WATER_CLASS_INVALID); } diff --git a/src/saveload/saveload.h b/src/saveload/saveload.h index 61d527340..07d45fafd 100644 --- a/src/saveload/saveload.h +++ b/src/saveload/saveload.h @@ -297,6 +297,7 @@ enum SaveLoadVersion : uint16 { SLV_SERVE_NEUTRAL_INDUSTRIES, ///< 210 PR#7234 Company stations can serve industries with attached neutral stations. SLV_ROADVEH_PATH_CACHE, ///< 211 PR#7261 Add path cache for road vehicles. SLV_REMOVE_OPF, ///< 212 PR#7245 Remove OPF. + SLV_TREES_WATER_CLASS, ///< 213 PR#7405 WaterClass update for tree tiles. SL_MAX_VERSION, ///< Highest possible saveload version }; |