diff options
Diffstat (limited to 'src/saveload')
-rw-r--r-- | src/saveload/group_sl.cpp | 3 | ||||
-rw-r--r-- | src/saveload/saveload.cpp | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/saveload/group_sl.cpp b/src/saveload/group_sl.cpp index 1e006a218..891d6ea6f 100644 --- a/src/saveload/group_sl.cpp +++ b/src/saveload/group_sl.cpp @@ -21,6 +21,7 @@ static const SaveLoad _group_desc[] = { SLE_VAR(Group, owner, SLE_UINT8), SLE_VAR(Group, vehicle_type, SLE_UINT8), SLE_VAR(Group, replace_protection, SLE_BOOL), + SLE_CONDVAR(Group, parent, SLE_UINT16, 189, SL_MAX_VERSION), SLE_END() }; @@ -42,6 +43,8 @@ static void Load_GRPS() while ((index = SlIterateArray()) != -1) { Group *g = new (index) Group(); SlObject(g, _group_desc); + + if (IsSavegameVersionBefore(189)) g->parent = INVALID_GROUP; } } diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp index e1daaf405..ab3e4a290 100644 --- a/src/saveload/saveload.cpp +++ b/src/saveload/saveload.cpp @@ -254,8 +254,9 @@ * 186 25833 * 187 25899 * 188 26169 1.4.x + * 189 26450 */ -extern const uint16 SAVEGAME_VERSION = 188; ///< Current savegame version of OpenTTD. +extern const uint16 SAVEGAME_VERSION = 189; ///< Current savegame version of OpenTTD. SavegameType _savegame_type; ///< type of savegame we are loading |