diff options
author | peter1138 <peter1138@openttd.org> | 2014-04-08 21:09:06 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2014-04-08 21:09:06 +0000 |
commit | 567d0ff3a7286fe830bf188c2911e3d10d70eb8c (patch) | |
tree | f61a570d4fb3a9bb1419b0eee818692686d75462 /src/saveload | |
parent | 3e9c10f9e11935a82d33fd5c66592d795c279777 (diff) | |
download | openttd-567d0ff3a7286fe830bf188c2911e3d10d70eb8c.tar.xz |
(svn r26450) -Feature: Hierarchical vehicle subgroups.
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 |