mirror of
https://github.com/FaceDeer/dfcaverns.git
synced 2025-07-14 06:20:25 +02:00
fix another spot where nvals_wave might get an out-of-bounds index passed to it. Also fix a spelling error in the lorebooks.
This commit is contained in:
@ -570,7 +570,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||
for i = 1, 30 do
|
||||
local x = math.random(minp.x, maxp.x)
|
||||
local z = math.random(minp.z, maxp.z)
|
||||
local index2d = mapgen_helper.index2d(emin, emax, x, z)
|
||||
local index2d = mapgen_helper.index2d(minp, maxp, x, z)
|
||||
local abs_cave = math.abs(nvals_cave[index2d]) -- range is from 0 to approximately 2, with 0 being connected and 2s being islands
|
||||
local wave = nvals_wave[index2d] * wave_mult
|
||||
local floor_height = math.floor(abs_cave * floor_mult + median + floor_displace + wave)-1
|
||||
@ -603,7 +603,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||
if hunters_enabled then
|
||||
local x = math.random(minp.x, maxp.x)
|
||||
local z = math.random(minp.z, maxp.z)
|
||||
local index2d = mapgen_helper.index2d(emin, emax, x, z)
|
||||
local index2d = mapgen_helper.index2d(minp, maxp, x, z)
|
||||
local abs_cave = math.abs(nvals_cave[index2d]) -- range is from 0 to approximately 2, with 0 being connected and 2s being islands
|
||||
local wave = nvals_wave[index2d] * wave_mult
|
||||
local floor_height = math.floor(abs_cave * floor_mult + median + floor_displace + wave)-1
|
||||
|
Reference in New Issue
Block a user