summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-06-10 18:53:43 +0000
committersmatz <smatz@openttd.org>2009-06-10 18:53:43 +0000
commit3eb8f643fb17b34826370823cdc65d2aaf0958e4 (patch)
treebd7876abc25081560099f064020d408876248afb
parent5a6bb538940beed2ef01055481f7ead565625833 (diff)
downloadopenttd-3eb8f643fb17b34826370823cdc65d2aaf0958e4.tar.xz
(svn r16554) -Fix (r16433): compilation with disabled network was broken
-rw-r--r--src/settings.cpp2
-rw-r--r--src/settings_func.h7
2 files changed, 8 insertions, 1 deletions
diff --git a/src/settings.cpp b/src/settings.cpp
index 73606af18..648c4c2fa 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -1523,6 +1523,7 @@ void SetDefaultCompanySettings(CompanyID cid)
}
}
+#if defined(ENABLE_NETWORK)
/**
* Sync all company settings in a multiplayer game.
*/
@@ -1538,6 +1539,7 @@ void SyncCompanySettings()
if (old_value != new_value) NetworkSend_Command(0, i, new_value, CMD_CHANGE_COMPANY_SETTING, NULL, NULL);
}
}
+#endif /* ENABLE_NETWORK */
/**
* Get the index in the _company_settings array of a setting
diff --git a/src/settings_func.h b/src/settings_func.h
index e04038ef7..44ac18442 100644
--- a/src/settings_func.h
+++ b/src/settings_func.h
@@ -26,7 +26,12 @@ void SaveGRFPresetToConfig(const char *config_name, struct GRFConfig *config);
void DeleteGRFPresetFromConfig(const char *config_name);
uint GetCompanySettingIndex(const char *name);
-void SyncCompanySettings();
void SetDefaultCompanySettings(CompanyID cid);
+#if defined(ENABLE_NETWORK)
+void SyncCompanySettings();
+#else /* ENABLE_NETWORK */
+static inline void SyncCompanySettings() {}
+#endif /* ENABLE_NETWORK */
+
#endif /* SETTINGS_FUNC_H */