fix block randomizer when world time set to constant daytime

This commit is contained in:
TenPlus1 2019-01-07 19:15:43 +00:00
parent 7bcb05516c
commit c1fcef324d

@ -573,7 +573,7 @@ function lucky_block:open(pos, digger, blocks_list)
blocks_list = blocks_list or lucky_list blocks_list = blocks_list or lucky_list
-- make sure it's really random -- make sure it's really random
math.randomseed(minetest.get_timeofday() + pos.x + pos.z) -- os.time() math.randomseed(minetest.get_timeofday() + pos.x + pos.z - os.time())
local luck = math.random(1, #blocks_list) ; -- luck = 1 local luck = math.random(1, #blocks_list) ; -- luck = 1
local action = blocks_list[luck][1] local action = blocks_list[luck][1]