Mercurial > hg > openttd
changeset 5052:a0b57cd462c4 draft
(svn r7102) -Codechange: Remove and hardcode unnecessary patch setting progress_update_interval
author | peter1138 <peter1138@openttd.org> |
---|---|
date | Tue, 07 Nov 2006 16:07:31 +0000 |
parents | e5d5f9f7ecea |
children | 82762e7993da |
files | genworld_gui.c settings.c settings_gui.c variables.h |
diffstat | 4 files changed, 4 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/genworld_gui.c +++ b/genworld_gui.c @@ -819,10 +819,10 @@ _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;
--- a/settings.c +++ b/settings.c @@ -1450,7 +1450,6 @@ 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()
--- a/settings_gui.c +++ b/settings_gui.c @@ -571,7 +571,6 @@ "invisible_trees", "population_in_label", "link_terraform_toolbar", - "progress_update_interval", "liveries", };
--- a/variables.h +++ b/variables.h @@ -114,7 +114,6 @@ 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