diff options
author | peter1138 <peter1138@openttd.org> | 2006-11-07 16:07:31 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2006-11-07 16:07:31 +0000 |
commit | c281cf028fd72a7e7d190f8aab4266363d51f219 (patch) | |
tree | 9662569a3ffc17278439d069239e51b0e9ff35ec | |
parent | e37b5d13bdce9ec5711bfe38c93969d61188e139 (diff) | |
download | openttd-c281cf028fd72a7e7d190f8aab4266363d51f219.tar.xz |
(svn r7102) -Codechange: Remove and hardcode unnecessary patch setting progress_update_interval
-rw-r--r-- | genworld_gui.c | 8 | ||||
-rw-r--r-- | settings.c | 1 | ||||
-rw-r--r-- | settings_gui.c | 1 | ||||
-rw-r--r-- | variables.h | 1 |
4 files changed, 4 insertions, 7 deletions
diff --git a/genworld_gui.c b/genworld_gui.c index cb1b0a135..ad51d3fdf 100644 --- a/genworld_gui.c +++ b/genworld_gui.c @@ -819,10 +819,10 @@ static void _SetGeneratingWorldProgress(gwp_class class, uint progress, uint tot _tp.percent = percent_table[class]; } - /* Don't update the screen too often. So update it once in the - * _patches.progress_update_interval. However, the _tick_counter - * increases with 8 every 30ms, so compensate for that. */ - if (!_network_dedicated && _tp.timer != 0 && _timer_counter - _tp.timer < (_patches.progress_update_interval * 8 / 30)) return; + /* Don't update the screen too often. So update it once in every 200ms. + * However, the _tick_counter increases by 8 every 30ms, so compensate + * for that. */ + if (!_network_dedicated && _tp.timer != 0 && _timer_counter - _tp.timer < (200 * 8 / 30)) return; /* Percentage is about the number of completed tasks, so 'current - 1' */ _tp.percent = percent_table[class] + (percent_table[class + 1] - percent_table[class]) * (_tp.current == 0 ? 0 : _tp.current - 1) / _tp.total; diff --git a/settings.c b/settings.c index c0557fa17..2d1bb288c 100644 --- a/settings.c +++ b/settings.c @@ -1450,7 +1450,6 @@ const SettingDesc _patch_settings[] = { SDT_CONDVAR(Patches, generation_seed, SLE_UINT32, 30, SL_MAX_VERSION, 0, 0, GENERATE_NEW_SEED, 0, MAX_UVALUE(uint32), 0, STR_NULL, NULL), SDT_CONDVAR(Patches, tree_placer, SLE_UINT8, 30, SL_MAX_VERSION, 0, MS, 2, 0, 2, 0, STR_CONFIG_PATCHES_TREE_PLACER, NULL), SDT_VAR (Patches, heightmap_rotation, SLE_UINT8, S, MS, 0, 0, 1, 0, STR_CONFIG_PATCHES_HEIGHTMAP_ROTATION, NULL), - SDT_VAR (Patches, progress_update_interval, SLE_UINT16, S, 0, 200, 0, 5000, 0, STR_CONFIG_PATCHES_PROGRESS_UPDATE_INTERVAL, NULL), SDT_VAR (Patches, se_flat_world_height, SLE_UINT8, S, 0, 0, 0, 15, 0, STR_CONFIG_PATCHES_SE_FLAT_WORLD_HEIGHT, NULL), SDT_END() diff --git a/settings_gui.c b/settings_gui.c index 88586746a..093a18226 100644 --- a/settings_gui.c +++ b/settings_gui.c @@ -571,7 +571,6 @@ static const char *_patches_ui[] = { "invisible_trees", "population_in_label", "link_terraform_toolbar", - "progress_update_interval", "liveries", }; diff --git a/variables.h b/variables.h index b8a4536ea..3e949390d 100644 --- a/variables.h +++ b/variables.h @@ -114,7 +114,6 @@ typedef struct Patches { uint32 generation_seed; // noise seed for world generation byte tree_placer; // the tree placer algorithm byte heightmap_rotation; // rotation director for the heightmap - uint16 progress_update_interval; // interval between two updates of the progress in hundreds of milliseconds byte se_flat_world_height; // land height a flat world gets in SE bool bribe; // enable bribing the local authority bool nonuniform_stations; // allow nonuniform train stations |