summaryrefslogtreecommitdiff
path: root/src/settings.cpp
diff options
context:
space:
mode:
authorMichael Lutz <michi@icosahedron.de>2021-10-03 17:15:48 +0200
committerMichael Lutz <michi@icosahedron.de>2021-12-16 22:28:32 +0100
commit549caca39cebc8c988f4e51d79d353cab4646d58 (patch)
tree6739fb0721fae36d6fc58eabd4be642062386dee /src/settings.cpp
parentb6933a2ebdf66c5fb23b2226d3ce07d71426d7d2 (diff)
downloadopenttd-549caca39cebc8c988f4e51d79d353cab4646d58.tar.xz
Codechange: Move command arguments to the back of the networked command function calls.
Diffstat (limited to 'src/settings.cpp')
-rw-r--r--src/settings.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/settings.cpp b/src/settings.cpp
index 52f30be08..d821239fb 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -1549,7 +1549,7 @@ bool SetSettingValue(const IntSettingDesc *sd, int32 value, bool force_newgame)
const IntSettingDesc *setting = sd->AsIntSetting();
if ((setting->flags & SF_PER_COMPANY) != 0) {
if (Company::IsValidID(_local_company) && _game_mode != GM_MENU) {
- return DoCommandP(0, 0, value, CMD_CHANGE_COMPANY_SETTING, nullptr, setting->GetName());
+ return DoCommandP(CMD_CHANGE_COMPANY_SETTING, 0, 0, value, setting->GetName());
}
setting->ChangeValue(&_settings_client.company, value);
@@ -1575,7 +1575,7 @@ bool SetSettingValue(const IntSettingDesc *sd, int32 value, bool force_newgame)
/* send non-company-based settings over the network */
if (!_networking || (_networking && _network_server)) {
- return DoCommandP(0, 0, value, CMD_CHANGE_SETTING, nullptr, setting->GetName());
+ return DoCommandP(CMD_CHANGE_SETTING, 0, 0, value, setting->GetName());
}
return false;
}
@@ -1603,7 +1603,7 @@ void SyncCompanySettings()
const SettingDesc *sd = GetSettingDesc(desc);
uint32 old_value = (uint32)sd->AsIntSetting()->Read(new_object);
uint32 new_value = (uint32)sd->AsIntSetting()->Read(old_object);
- if (old_value != new_value) NetworkSendCommand(0, 0, new_value, CMD_CHANGE_COMPANY_SETTING, nullptr, sd->GetName(), _local_company);
+ if (old_value != new_value) NetworkSendCommand(CMD_CHANGE_COMPANY_SETTING, nullptr, _local_company, 0, 0, new_value, sd->GetName());
}
}