Fix cave regression.

This commit is contained in:
Duane 2016-08-03 07:59:07 -05:00
parent 2ae0d2f2a1
commit aa379d0701

View file

@ -456,8 +456,11 @@ 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 write_dungeon, write_p4
write_dungeon, write_p4 = fun_caves.dungeon(minp, maxp, data, p2data, area, node, heightmap)
if write_dungeon then
write = true
write_p2 = write_p2 or write_p4
break
end
end