(svn r7102) -Codechange: Remove and hardcode unnecessary patch setting progress_update_interval
authorpeter1138
Tue, 07 Nov 2006 16:07:31 +0000
changeset 5052 afa697e85f79
parent 5051 0ea8270d080b
child 5053 47873bc55d7c
(svn r7102) -Codechange: Remove and hardcode unnecessary patch setting progress_update_interval
genworld_gui.c
settings.c
settings_gui.c
variables.h
--- a/genworld_gui.c	Tue Nov 07 15:58:54 2006 +0000
+++ b/genworld_gui.c	Tue Nov 07 16:07:31 2006 +0000
@@ -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	Tue Nov 07 15:58:54 2006 +0000
+++ b/settings.c	Tue Nov 07 16:07:31 2006 +0000
@@ -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	Tue Nov 07 15:58:54 2006 +0000
+++ b/settings_gui.c	Tue Nov 07 16:07:31 2006 +0000
@@ -571,7 +571,6 @@
 	"invisible_trees",
 	"population_in_label",
 	"link_terraform_toolbar",
-	"progress_update_interval",
 	"liveries",
 };
 
--- a/variables.h	Tue Nov 07 15:58:54 2006 +0000
+++ b/variables.h	Tue Nov 07 16:07:31 2006 +0000
@@ -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