Mountain corrections
This commit is contained in:
parent
f4e6c52f2f
commit
ba83b79a9c
2 changed files with 35 additions and 51 deletions
2
deco.lua
2
deco.lua
|
@ -95,7 +95,7 @@ minetest.register_biome({
|
||||||
--node_water = "",
|
--node_water = "",
|
||||||
--node_river_water = "",
|
--node_river_water = "",
|
||||||
y_min = 5,
|
y_min = 5,
|
||||||
y_max = 31000,
|
y_max = 80,
|
||||||
heat_point = 25,
|
heat_point = 25,
|
||||||
humidity_point = 0,
|
humidity_point = 0,
|
||||||
})
|
})
|
||||||
|
|
18
mapgen.lua
18
mapgen.lua
|
@ -94,14 +94,6 @@ end
|
||||||
local function detect_bull(heightmap, csize)
|
local function detect_bull(heightmap, csize)
|
||||||
local probably = false
|
local probably = false
|
||||||
|
|
||||||
if minp.y >= 8 + csize.y / 2 then
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
if maxp.y <= 8 - csize.y / 2 then
|
|
||||||
probably = true
|
|
||||||
end
|
|
||||||
|
|
||||||
local j = -31000
|
local j = -31000
|
||||||
local k = 0
|
local k = 0
|
||||||
local cutoff = (csize.x * csize.z) * 0.1
|
local cutoff = (csize.x * csize.z) * 0.1
|
||||||
|
@ -111,7 +103,7 @@ local function detect_bull(heightmap, csize)
|
||||||
if k > cutoff then
|
if k > cutoff then
|
||||||
--print("maxp.y: "..maxp.y..", minp.y: "..minp.y..", heightmap stuck at: "..heightmap[i])
|
--print("maxp.y: "..maxp.y..", minp.y: "..minp.y..", heightmap stuck at: "..heightmap[i])
|
||||||
return true
|
return true
|
||||||
elseif not probably and i > 2 * cutoff then
|
elseif i > 2 * cutoff then
|
||||||
--print("maxp.y: "..maxp.y..", minp.y: "..minp.y..", guessing good heightmap")
|
--print("maxp.y: "..maxp.y..", minp.y: "..minp.y..", guessing good heightmap")
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
@ -159,9 +151,6 @@ function fun_caves.generate(p_minp, p_maxp, seed)
|
||||||
for x = minp.x, maxp.x do
|
for x = minp.x, maxp.x do
|
||||||
index = index + 1
|
index = index + 1
|
||||||
|
|
||||||
if bullshit_heightmap and maxp.y > 0 then
|
|
||||||
-- nop
|
|
||||||
else
|
|
||||||
write = true
|
write = true
|
||||||
index3d = noise_area:index(x - minp.x, 0, z - minp.z)
|
index3d = noise_area:index(x - minp.x, 0, z - minp.z)
|
||||||
local ivm = area:index(x, minp.y, z)
|
local ivm = area:index(x, minp.y, z)
|
||||||
|
@ -187,7 +176,6 @@ function fun_caves.generate(p_minp, p_maxp, seed)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
-- Air needs to be placed prior to decorations.
|
-- Air needs to be placed prior to decorations.
|
||||||
local index = 0
|
local index = 0
|
||||||
|
@ -195,9 +183,6 @@ function fun_caves.generate(p_minp, p_maxp, seed)
|
||||||
for z = minp.z, maxp.z do
|
for z = minp.z, maxp.z do
|
||||||
for x = minp.x, maxp.x do
|
for x = minp.x, maxp.x do
|
||||||
index = index + 1
|
index = index + 1
|
||||||
if bullshit_heightmap and maxp.y > 0 then
|
|
||||||
-- nop
|
|
||||||
else
|
|
||||||
local pn = minetest.get_perlin(plant_noise):get2d({x=x, y=z})
|
local pn = minetest.get_perlin(plant_noise):get2d({x=x, y=z})
|
||||||
local biome = fun_caves.biome_ids[biomemap[index]]
|
local biome = fun_caves.biome_ids[biomemap[index]]
|
||||||
index3d = noise_area:index(x - minp.x, 0, z - minp.z)
|
index3d = noise_area:index(x - minp.x, 0, z - minp.z)
|
||||||
|
@ -221,7 +206,6 @@ function fun_caves.generate(p_minp, p_maxp, seed)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
if write then
|
if write then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue