diff options
author | Auke Kok <sofar@foo-projects.org> | 2016-04-19 15:47:14 -0700 |
---|---|---|
committer | paramat <mat.gregory@virginmedia.com> | 2016-04-21 10:14:59 +0100 |
commit | a60aa8e226584b97d0be0d26688b302dfddf7125 (patch) | |
tree | 85b5b0fa10dbbb51bc2362bac6a25f91d06cee0b /builtin/game | |
parent | 8cf26bb0bbc94de437342c84c7b0854feb8957e8 (diff) | |
download | minetest-a60aa8e226584b97d0be0d26688b302dfddf7125.tar.gz minetest-a60aa8e226584b97d0be0d26688b302dfddf7125.tar.bz2 minetest-a60aa8e226584b97d0be0d26688b302dfddf7125.zip |
Fix timer initialization.
This fixes the problem that the first timer tick is an
overrun and causes all timers to expire immediately.
replaces #4003
Diffstat (limited to 'builtin/game')
-rw-r--r-- | builtin/game/misc.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/game/misc.lua b/builtin/game/misc.lua index 4f58710d0..de41cfc91 100644 --- a/builtin/game/misc.lua +++ b/builtin/game/misc.lua @@ -6,7 +6,7 @@ local jobs = {} local time = 0.0 -local last = 0.0 +local last = core.get_us_time() / 1000000 core.register_globalstep(function(dtime) local new = core.get_us_time() / 1000000 |