Change us_time calls to gametime.
This commit is contained in:
parent
2b8b604162
commit
11c4a7d7d0
3 changed files with 6 additions and 6 deletions
6
abms.lua
6
abms.lua
|
@ -1,7 +1,7 @@
|
|||
-- see also, fungal_tree.lua
|
||||
|
||||
-- player surface damage and hunger
|
||||
local dps_delay = 3000000
|
||||
local dps_delay = 3
|
||||
|
||||
local last_dps_check = 0
|
||||
local cold_delay = 5
|
||||
|
@ -42,7 +42,7 @@ spike_soil['fun_caves:black_sand'] = true
|
|||
-- all the fun_caves globalstep functions
|
||||
------------------------------------------------------------
|
||||
minetest.register_globalstep(function(dtime)
|
||||
local time = minetest.get_us_time()
|
||||
local time = minetest.get_gametime()
|
||||
|
||||
-- Execute only after an interval.
|
||||
if last_dps_check and time - last_dps_check < dps_delay then
|
||||
|
@ -170,7 +170,7 @@ minetest.register_globalstep(function(dtime)
|
|||
dps_count = hunger_delay
|
||||
end
|
||||
|
||||
last_dps_check = minetest.get_us_time()
|
||||
last_dps_check = minetest.get_gametime()
|
||||
dps_count = dps_count - 1
|
||||
end)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue