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 /genworld_gui.c | |
parent | e37b5d13bdce9ec5711bfe38c93969d61188e139 (diff) | |
download | openttd-c281cf028fd72a7e7d190f8aab4266363d51f219.tar.xz |
(svn r7102) -Codechange: Remove and hardcode unnecessary patch setting progress_update_interval
Diffstat (limited to 'genworld_gui.c')
-rw-r--r-- | genworld_gui.c | 8 |
1 files changed, 4 insertions, 4 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; |