(svn r26450) -Feature: Hierarchical vehicle subgroups.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user