Localize variables. Prevent shafts from damaging trees.

This commit is contained in:
Duane 2016-08-02 04:56:42 -05:00
parent 61c3cb0edd
commit 2270e87a71
2 changed files with 11 additions and 9 deletions

View file

@ -430,18 +430,20 @@ local function generate(p_minp, p_maxp, seed)
end
if fun_caves.dungeon then
write, write_p2 = fun_caves.dungeon(minp, maxp, data, p2data, area, node, heightmap)
if write then
local full
write, write_p2, full = fun_caves.dungeon(minp, maxp, data, p2data, area, node, heightmap)
if write and full then
break
end
end
if fun_caves.cavegen and fun_caves.decogen then
local h2
write, h2 = fun_caves.cavegen(minp, maxp, data, area, node, heightmap, underzone, ground_nodes)
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 = write or write_cave
local biomemap
if fun_caves.use_bi_hi then