Simplify if tree.

master
Duane Robertson 2016-04-08 21:34:41 -05:00
parent 8b43b4d887
commit 74734f9356
1 changed files with 1 additions and 9 deletions

View File

@ -315,15 +315,7 @@ function loud_walking.generate(p_minp, p_maxp, seed)
data[ivm] = node("air")
lightmap[ivm] = 0
in_cave = false
elseif math.min(dx, csize.x - dx) + math.min(dy, csize.y - dy) + math.min(dz, csize.z - dz) < bevel + 1 then
if biome ~= "underground" and dy < half then
data[ivm] = node("loud_walking:scrith")
lightmap[ivm] = 0
else
data[ivm] = node(glass[cloud[index] < cloud_i and 1 or 2])
end
in_cave = false
elseif (dx == 0 or dx == csize.x - 1) or (dz == 0 or dz == csize.z - 1) or (dy == 0 or dy == csize.y - 1) then
elseif (dx == 0 or dx == csize.x - 1) or (dz == 0 or dz == csize.z - 1) or (dy == 0 or dy == csize.y - 1) or math.min(dx, csize.x - dx) + math.min(dy, csize.y - dy) + math.min(dz, csize.z - dz) < bevel + 1 then
if math.abs(dy - half - 2) < 2 and (dz == half or dx == half) then
data[ivm] = node("air")
else