mirror of
https://github.com/FaceDeer/dfcaverns.git
synced 2025-02-03 22:10:24 +01:00
fix for overgen crash in level 2
This commit is contained in:
parent
cc30f96d52
commit
ce5c6f807d
@ -141,7 +141,7 @@ local decorate_level_2 = function(minp, maxp, seed, vm, node_arrays, area, data)
|
|||||||
for vi, x, y, z in area:iterp_yxz(area.MinEdge, area.MaxEdge) do
|
for vi, x, y, z in area:iterp_yxz(area.MinEdge, area.MaxEdge) do
|
||||||
local cave_val = nvals_cave[vi]
|
local cave_val = nvals_cave[vi]
|
||||||
if cave_val < -flooding_threshold then
|
if cave_val < -flooding_threshold then
|
||||||
|
if mapgen_helper.is_pos_within_box({x=x, y=y, z=z}, minp, maxp) then
|
||||||
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
|
local index2d = mapgen_helper.index2di(minp, maxp, area, vi)
|
||||||
local biome_name = get_biome(heatmap[index2d], humiditymap[index2d])
|
local biome_name = get_biome(heatmap[index2d], humiditymap[index2d])
|
||||||
local cave_threshold = cavern_def.cave_threshold
|
local cave_threshold = cavern_def.cave_threshold
|
||||||
@ -156,6 +156,7 @@ local decorate_level_2 = function(minp, maxp, seed, vm, node_arrays, area, data)
|
|||||||
data[vi] = c_veinstone
|
data[vi] = c_veinstone
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
if data[vi] == c_air and y <= subsea_level then
|
if data[vi] == c_air and y <= subsea_level then
|
||||||
data[vi] = c_water -- otherwise, fill air with water when below sea level
|
data[vi] = c_water -- otherwise, fill air with water when below sea level
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user