projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8cf26bb
)
Fix timer initialization.
author
Auke Kok
<sofar@foo-projects.org>
Tue, 19 Apr 2016 22:47:14 +0000
(15:47 -0700)
committer
paramat
<mat.gregory@virginmedia.com>
Thu, 21 Apr 2016 09:14:59 +0000
(10:14 +0100)
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
patch
|
blob
|
history
diff --git
a/builtin/game/misc.lua
b/builtin/game/misc.lua
index 4f58710d0a4cce469923b45504e29bb78c8c5682..de41cfc91161a44a10fdbbb69710db342a38bc79 100644
(file)
--- 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() / 100000
0
core.register_globalstep(function(dtime)
local new = core.get_us_time() / 1000000