summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2009-05-26 12:53:34 +0000
committeryexo <yexo@openttd.org>2009-05-26 12:53:34 +0000
commit279746236bfdbcfd8f203df2de77e453402f3ad4 (patch)
tree4a23f88dccd4f4ee1928cffd2a71b588641f5aa6
parentaf07333c78199d08659df9f556f09b06efc36d53 (diff)
downloadopenttd-279746236bfdbcfd8f203df2de77e453402f3ad4.tar.xz
(svn r16431) -Fix (16429): Company settings can also be changed in multiplayer games
-rw-r--r--src/settings_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp
index 202e2e8d0..10a0dd016 100644
--- a/src/settings_gui.cpp
+++ b/src/settings_gui.cpp
@@ -1013,7 +1013,7 @@ void SettingEntry::DrawSetting(GameSettings *settings_ptr, const SettingDesc *sd
bool disabled = false;
/* We do not allow changes of some items when we are a client in a networkgame */
- if (!(sd->save.conv & SLF_NETWORK_NO) && _networking && !_network_server) editable = false;
+ if (!(sd->save.conv & SLF_NETWORK_NO) && _networking && !_network_server && !(sdb->flags & SGF_PER_COMPANY)) editable = false;
if ((sdb->flags & SGF_NETWORK_ONLY) && !_networking) editable = false;
if ((sdb->flags & SGF_NO_NETWORK) && _networking) editable = false;
@@ -1446,7 +1446,7 @@ struct GameSettingsWindow : Window {
const SettingDesc *sd = pe->d.entry.setting;
/* return if action is only active in network, or only settable by server */
- if (!(sd->save.conv & SLF_NETWORK_NO) && _networking && !_network_server) return;
+ if (!(sd->save.conv & SLF_NETWORK_NO) && _networking && !_network_server && !(sd->desc.flags & SGF_PER_COMPANY)) return;
if ((sd->desc.flags & SGF_NETWORK_ONLY) && !_networking) return;
if ((sd->desc.flags & SGF_NO_NETWORK) && _networking) return;