math.random can have trouble when given more than a 32 bit maxint range
This commit is contained in:
parent
d10e0a6e5a
commit
28d1aa3634
@ -435,7 +435,7 @@ end
|
||||
local grid_size = mapgen_helper.block_size * 4
|
||||
|
||||
function subterrane:vertically_consistent_randomp(pos)
|
||||
local next_seed = math.random(1, 1000000000000)
|
||||
local next_seed = math.random(1, 2^31)
|
||||
math.randomseed(minetest.hash_node_position({x=pos.x, y=0, z=pos.z}))
|
||||
local output = math.random()
|
||||
math.randomseed(next_seed)
|
||||
|
Loading…
x
Reference in New Issue
Block a user