mirror of
git://repo.or.cz/rocks.git
synced 2024-11-16 15:30:41 +01:00
Check for wherein for every block of vein, not just center. Removed vein density.
This commit is contained in:
parent
bb7d89bf7d
commit
450da72080
|
@ -157,8 +157,7 @@ rocksl.veingen=function(veins,minp,maxp,seed)
|
||||||
local posc = {x=x+x0,y=y+y0,z=z+z0}
|
local posc = {x=x+x0,y=y+y0,z=z+z0}
|
||||||
posi = area:index(posc.x, posc.y, posc.z)
|
posi = area:index(posc.x, posc.y, posc.z)
|
||||||
local nv=noise[noise_ix]
|
local nv=noise[noise_ix]
|
||||||
local luck=random:next(0,99)
|
if (ignore_wherein or (nodes[posi]==wherein_ctx)) and (((x^2)+(y^2)+(z^2))<((vein.radius.average+nv)^2)) then
|
||||||
if (luck<vein.density) and (((x^2)+(y^2)+(z^2))<((vein.radius.average+nv)^2)) then
|
|
||||||
nodes[posi]=primary_ctx
|
nodes[posi]=primary_ctx
|
||||||
local luck=random:next(0,99)
|
local luck=random:next(0,99)
|
||||||
for _,sec in pairs(vein.secondary) do
|
for _,sec in pairs(vein.secondary) do
|
||||||
|
|
Loading…
Reference in New Issue
Block a user