Remove dead heightmap code.

This commit is contained in:
Duane 2016-08-11 00:13:37 -05:00
parent 3f8a2de971
commit e5e7475476
2 changed files with 2 additions and 14 deletions

View file

@ -17,11 +17,6 @@ fun_caves.cavegen = function(minp, maxp, data, area, node, heightmap, underzone,
local map_min = {x = minp.x, y = minp.y - 1, z = minp.z}
local return_heightmap = false
if not heightmap then
return_heightmap = true
heightmap = {}
end
local cave_1 = minetest.get_perlin_map(fun_caves.cave_noise_1, map_max):get3dMap_flat(map_min)
local cave_2 = minetest.get_perlin_map(fun_caves.cave_noise_2, map_max):get3dMap_flat(map_min)
local cave_3 = minetest.get_perlin_map(cave_noise_3, {x=csize.x, y=csize.z}):get2dMap_flat({x=minp.x, y=minp.z})
@ -140,9 +135,5 @@ fun_caves.cavegen = function(minp, maxp, data, area, node, heightmap, underzone,
end
end
if return_heightmap then
return write, heightmap
else
return write, nil
end
return write
end

View file

@ -442,10 +442,7 @@ local function generate(p_minp, p_maxp, seed)
local biomemap
if fun_caves.cavegen and fun_caves.decogen then
local h2, write_cave
write_cave, h2 = fun_caves.cavegen(minp, maxp, data, area, node, heightmap, underzone, ground_nodes)
if h2 then
heightmap = h2
end
write_cave = fun_caves.cavegen(minp, maxp, data, area, node, heightmap, underzone, ground_nodes)
write = write or write_cave
if fun_caves.use_bi_hi then