From a60aa8e226584b97d0be0d26688b302dfddf7125 Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Tue, 19 Apr 2016 15:47:14 -0700 Subject: [PATCH] Fix timer initialization. This fixes the problem that the first timer tick is an overrun and causes all timers to expire immediately. replaces #4003 --- builtin/game/misc.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/game/misc.lua b/builtin/game/misc.lua index 4f58710d..de41cfc9 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