summaryrefslogtreecommitdiff
path: root/src/saveload/group_sl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/saveload/group_sl.cpp')
-rw-r--r--src/saveload/group_sl.cpp3
1 files changed, 3 insertions, 0 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;
}
}