From: Auke Kok Date: Tue, 19 Apr 2016 22:47:14 +0000 (-0700) Subject: Fix timer initialization. X-Git-Tag: 0.4.14~91 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a60aa8e226584b97d0be0d26688b302dfddf7125;p=oweals%2Fminetest.git Fix timer initialization. This fixes the problem that the first timer tick is an overrun and causes all timers to expire immediately. replaces #4003 --- 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