summaryrefslogtreecommitdiff
path: root/src/settings.cpp
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2021-06-08 13:21:31 +0200
committerPatric Stout <github@truebrain.nl>2021-06-14 21:58:05 +0200
commit4600d289b5d12389137d36e57bfda09c26ed6caf (patch)
treebeadd0344d657781fb3dc600065b25ffa40d9bc2 /src/settings.cpp
parent909f3f25bd58ad2dbb658beeea80a9fcd1494302 (diff)
downloadopenttd-4600d289b5d12389137d36e57bfda09c26ed6caf.tar.xz
Codechange: ability to store structs and list of structs in savegames
The commits following this will use this new functionality. Currently, a few places do this manually. This has as drawback that the Save() and Load() code need to be in sync, and that any change can result in (old) savegames no longer loading. In general, it is annoying code to maintain. By putting everything in a description table, and use that for both Save() and Load(), it becomes easier to see what is going on, and hopefully less likely for people to make mistakes.
Diffstat (limited to 'src/settings.cpp')
-rw-r--r--src/settings.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/settings.cpp b/src/settings.cpp
index 2b222ad78..23f43d24f 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -2024,7 +2024,7 @@ static std::vector<SaveLoad> GetSettingsDesc(const SettingTable &settings, bool
if (is_loading && (sd->flags & SF_NO_NETWORK_SYNC) && _networking && !_network_server) {
/* We don't want to read this setting, so we do need to skip over it. */
- saveloads.push_back({sd->save.cmd, GetVarFileType(sd->save.conv) | SLE_VAR_NULL, sd->save.length, sd->save.version_from, sd->save.version_to, 0, nullptr, 0});
+ saveloads.push_back({sd->save.cmd, GetVarFileType(sd->save.conv) | SLE_VAR_NULL, sd->save.length, sd->save.version_from, sd->save.version_to, 0, nullptr, 0, nullptr});
continue;
}