Weather_pack: os.time → minetest.get_gametime
This commit is contained in:
parent
53f231a576
commit
c6a471e5a7
3 changed files with 12 additions and 12 deletions
|
@ -14,10 +14,10 @@ minetest.register_globalstep(function(dtime)
|
|||
|
||||
rain.make_weather()
|
||||
|
||||
if (thunder.next_strike <= os.time()) then
|
||||
if (thunder.next_strike <= minetest.get_gametime()) then
|
||||
lightning.strike()
|
||||
local delay = math.random(thunder.min_delay, thunder.max_delay)
|
||||
thunder.next_strike = os.time() + delay
|
||||
thunder.next_strike = minetest.get_gametime() + delay
|
||||
end
|
||||
|
||||
end)
|
||||
|
@ -34,4 +34,4 @@ if weather.reg_weathers.thunder == nil then
|
|||
min_duration = 120,
|
||||
max_duration = 600,
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue