mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-12 18:40:29 +00:00
(svn r7102) -Codechange: Remove and hardcode unnecessary patch setting progress_update_interval
This commit is contained in:
parent
e37b5d13bd
commit
c281cf028f
@ -819,10 +819,10 @@ static void _SetGeneratingWorldProgress(gwp_class class, uint progress, uint tot
|
|||||||
_tp.percent = percent_table[class];
|
_tp.percent = percent_table[class];
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Don't update the screen too often. So update it once in the
|
/* Don't update the screen too often. So update it once in every 200ms.
|
||||||
* _patches.progress_update_interval. However, the _tick_counter
|
* However, the _tick_counter increases by 8 every 30ms, so compensate
|
||||||
* increases with 8 every 30ms, so compensate for that. */
|
* for that. */
|
||||||
if (!_network_dedicated && _tp.timer != 0 && _timer_counter - _tp.timer < (_patches.progress_update_interval * 8 / 30)) return;
|
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' */
|
/* 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;
|
_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, 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_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, 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_VAR (Patches, se_flat_world_height, SLE_UINT8, S, 0, 0, 0, 15, 0, STR_CONFIG_PATCHES_SE_FLAT_WORLD_HEIGHT, NULL),
|
||||||
|
|
||||||
SDT_END()
|
SDT_END()
|
||||||
|
@ -571,7 +571,6 @@ static const char *_patches_ui[] = {
|
|||||||
"invisible_trees",
|
"invisible_trees",
|
||||||
"population_in_label",
|
"population_in_label",
|
||||||
"link_terraform_toolbar",
|
"link_terraform_toolbar",
|
||||||
"progress_update_interval",
|
|
||||||
"liveries",
|
"liveries",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -114,7 +114,6 @@ typedef struct Patches {
|
|||||||
uint32 generation_seed; // noise seed for world generation
|
uint32 generation_seed; // noise seed for world generation
|
||||||
byte tree_placer; // the tree placer algorithm
|
byte tree_placer; // the tree placer algorithm
|
||||||
byte heightmap_rotation; // rotation director for the heightmap
|
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
|
byte se_flat_world_height; // land height a flat world gets in SE
|
||||||
bool bribe; // enable bribing the local authority
|
bool bribe; // enable bribing the local authority
|
||||||
bool nonuniform_stations; // allow nonuniform train stations
|
bool nonuniform_stations; // allow nonuniform train stations
|
||||||
|
Loading…
Reference in New Issue
Block a user