(svn r7102) -Codechange: Remove and hardcode unnecessary patch setting progress_update_interval

replace/41b28d7194a279bdc17475d4fbe2ea6ec885a466
peter1138 18 years ago
parent e37b5d13bd
commit c281cf028f

@ -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;

@ -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()

@ -571,7 +571,6 @@ static const char *_patches_ui[] = {
"invisible_trees",
"population_in_label",
"link_terraform_toolbar",
"progress_update_interval",
"liveries",
};

@ -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

Loading…
Cancel
Save