summaryrefslogtreecommitdiff
path: root/src/settings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/settings.cpp')
-rw-r--r--src/settings.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/settings.cpp b/src/settings.cpp
index 93caff15d..c2594277d 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -2025,9 +2025,15 @@ static void LoadSettings(const SettingTable &settings, void *object)
for (auto &osd : settings) {
if (osd->save.conv & SLF_NOT_IN_SAVE) continue;
- void *ptr = GetVariableAddress(object, osd->save);
+ SaveLoad sl = osd->save;
+ if ((osd->save.conv & SLF_NO_NETWORK_SYNC) && _networking && !_network_server) {
+ /* We don't want to read this setting, so we do need to skip over it. */
+ sl = SLE_NULL(static_cast<uint16>(SlCalcConvMemLen(osd->save.conv) * osd->save.length));
+ }
+
+ void *ptr = GetVariableAddress(object, sl);
+ if (!SlObjectMember(ptr, sl)) continue;
- if (!SlObjectMember(ptr, osd->save)) continue;
if (osd->IsIntSetting()) {
const IntSettingDesc *int_setting = osd->AsIntSetting();
int_setting->MakeValueValidAndWrite(object, int_setting->Read(object));