summaryrefslogtreecommitdiff
path: root/settings_gui.c
diff options
context:
space:
mode:
authorKUDr <kudr@openttd.org>2006-11-17 10:42:20 +0000
committerKUDr <kudr@openttd.org>2006-11-17 10:42:20 +0000
commitd6b98584ab05ddf30b5e8b5e37a60bfca981c8dc (patch)
treed17ad6b6b7c13ec73d8fd079479346d21cbf28b7 /settings_gui.c
parent590e90cd9e06df38d6136622efe79ad651b6300f (diff)
downloadopenttd-d6b98584ab05ddf30b5e8b5e37a60bfca981c8dc.tar.xz
(svn r7190) -Fix: If the non-player-based _patches setting was changed on the server during MP game, the callback function was:
1. Called only on the server but not on its clients. 2. Was called before the setting change occurred (usually with no effect) 3. Received old 'p1' argument value intead of new one It could cause some MP desyncs in the future.
Diffstat (limited to 'settings_gui.c')
-rw-r--r--settings_gui.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/settings_gui.c b/settings_gui.c
index 7af75a6a6..c336e86fa 100644
--- a/settings_gui.c
+++ b/settings_gui.c
@@ -833,7 +833,6 @@ static void PatchesSelectionWndProc(Window *w, WindowEvent *e)
if (value != oldvalue) {
SetPatchValue(page->entries[btn].index, patches_ptr, value);
SetWindowDirty(w);
- if (sdb->proc != NULL) sdb->proc((int32)ReadValue(var, sd->save.conv));
}
} else {
/* only open editbox for types that its sensible for */
@@ -868,7 +867,6 @@ static void PatchesSelectionWndProc(Window *w, WindowEvent *e)
if (e->we.edittext.str != NULL) {
const PatchEntry *pe = &_patches_page[WP(w,def_d).data_1].entries[WP(w,def_d).data_3];
const SettingDesc *sd = pe->setting;
- void *var = ini_get_variable(&sd->save, patches_ptr);
int32 value = atoi(e->we.edittext.str);
/* Save the correct currency-translated value */
@@ -876,8 +874,6 @@ static void PatchesSelectionWndProc(Window *w, WindowEvent *e)
SetPatchValue(pe->index, patches_ptr, value);
SetWindowDirty(w);
-
- if (sd->desc.proc != NULL) sd->desc.proc((int32)ReadValue(var, sd->save.conv));
}
break;
}