summaryrefslogtreecommitdiff
path: root/src/genworld_gui.cpp
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2007-06-22 20:04:21 +0000
committertruelight <truelight@openttd.org>2007-06-22 20:04:21 +0000
commit7bfc7d19e814567bb09acda7406cb437f5e2f213 (patch)
tree487e36c90385f72fecad8d7a35fdb2c0192bec39 /src/genworld_gui.cpp
parentd5f4251823f878285532149272d039f1a7a4bcc3 (diff)
downloadopenttd-7bfc7d19e814567bb09acda7406cb437f5e2f213.tar.xz
(svn r10276) -Codechange: made a counter based on milliseconds and independent of the game-state to base double-click and TGP Generation Process on
-Codechange: renamed _timer_counter to _palette_animation_counter, as that is what it is
Diffstat (limited to 'src/genworld_gui.cpp')
-rw-r--r--src/genworld_gui.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/genworld_gui.cpp b/src/genworld_gui.cpp
index 4163d168a..43b204161 100644
--- a/src/genworld_gui.cpp
+++ b/src/genworld_gui.cpp
@@ -875,14 +875,12 @@ static void _SetGeneratingWorldProgress(gwp_class cls, uint progress, uint total
_tp.percent = percent_table[cls];
}
- /* 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;
+ /* Don't update the screen too often. So update it once in every 200ms */
+ if (!_network_dedicated && _tp.timer != 0 && _realtime_tick - _tp.timer < 200) return;
/* Percentage is about the number of completed tasks, so 'current - 1' */
_tp.percent = percent_table[cls] + (percent_table[cls + 1] - percent_table[cls]) * (_tp.current == 0 ? 0 : _tp.current - 1) / _tp.total;
- _tp.timer = _timer_counter;
+ _tp.timer = _realtime_tick;
if (_network_dedicated) {
static uint last_percent = 0;