summaryrefslogtreecommitdiff
path: root/src/settings_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-11-17 22:25:16 +0000
committerrubidium <rubidium@openttd.org>2007-11-17 22:25:16 +0000
commit7305a1f1fe4099a7b34e4f19356b775d1b5628b4 (patch)
tree5a088947831b7e86a3d18c2749d6dd39296de048 /src/settings_gui.cpp
parent2e8d37dcdf08afc074cbff9b610ddf9954af088e (diff)
downloadopenttd-7305a1f1fe4099a7b34e4f19356b775d1b5628b4.tar.xz
(svn r11452) -Change: do not allow configuration changes, that NewGRFs can directly use to change their behaviour, during network games as this can cause desyncs.
Diffstat (limited to 'src/settings_gui.cpp')
-rw-r--r--src/settings_gui.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp
index aa255f31d..7c670fd14 100644
--- a/src/settings_gui.cpp
+++ b/src/settings_gui.cpp
@@ -827,6 +827,7 @@ static void PatchesSelectionWndProc(Window *w, WindowEvent *e)
// 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 ((sdb->flags & SGF_NETWORK_ONLY) && !_networking) editable = false;
+ if ((sdb->flags & SGF_NO_NETWORK) && _networking) editable = false;
if (sdb->cmd == SDT_BOOLX) {
static const int _bool_ctabs[2][2] = {{9, 4}, {7, 6}};
@@ -886,8 +887,9 @@ static void PatchesSelectionWndProc(Window *w, WindowEvent *e)
sd = page->entries[btn].setting;
/* return if action is only active in network, or only settable by server */
- if ((sd->desc.flags & SGF_NETWORK_ONLY) && !_networking) return;
if (!(sd->save.conv & SLF_NETWORK_NO) && _networking && !_network_server) return;
+ if ((sd->desc.flags & SGF_NETWORK_ONLY) && !_networking) return;
+ if ((sd->desc.flags & SGF_NO_NETWORK) && _networking) return;
var = GetVariableAddress(patches_ptr, &sd->save);
value = (int32)ReadValue(var, sd->save.conv);