1
0
mirror of git://repo.or.cz/rocks.git synced 2024-09-28 23:30:39 +02:00

Check for wherein for every block of vein, not just center. Removed vein density.

This commit is contained in:
Tomáš Brada 2015-04-10 21:20:36 +02:00
parent bb7d89bf7d
commit 450da72080

View File

@ -157,8 +157,7 @@ rocksl.veingen=function(veins,minp,maxp,seed)
local posc = {x=x+x0,y=y+y0,z=z+z0}
posi = area:index(posc.x, posc.y, posc.z)
local nv=noise[noise_ix]
local luck=random:next(0,99)
if (luck<vein.density) and (((x^2)+(y^2)+(z^2))<((vein.radius.average+nv)^2)) then
if (ignore_wherein or (nodes[posi]==wherein_ctx)) and (((x^2)+(y^2)+(z^2))<((vein.radius.average+nv)^2)) then
nodes[posi]=primary_ctx
local luck=random:next(0,99)
for _,sec in pairs(vein.secondary) do