Compare commits
1 Commits
master
...
dungeons_e
Author | SHA1 | Date |
---|---|---|
Bram van den Heuvel | 57874f4dfb |
|
@ -406,6 +406,8 @@ local function dungeons_nodes(minp, maxp, blockseed)
|
|||
local pr = PseudoRandom(blockseed)
|
||||
for a=1, attempts do
|
||||
local dim = dungeonsizes[pr:next(1, #dungeonsizes)]
|
||||
|
||||
if ymin <= ymax - dim.y - 1 then
|
||||
local x = pr:next(minp.x, maxp.x-dim.x-1)
|
||||
local y = pr:next(ymin , ymax -dim.y-1)
|
||||
local z = pr:next(minp.z, maxp.z-dim.z-1)
|
||||
|
@ -414,6 +416,7 @@ local function dungeons_nodes(minp, maxp, blockseed)
|
|||
minetest.log("verbose","[mcl_dungeons] size=" ..minetest.pos_to_string(dim) .. ", emerge from "..minetest.pos_to_string(p1) .. " to " .. minetest.pos_to_string(p2))
|
||||
emerge_area(p1, p2, ecb_spawn_dungeon, {p1=p1, p2=p2, dim=dim, pr=pr})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function mcl_dungeons.spawn_dungeon(p1, _, pr)
|
||||
|
|
Loading…
Reference in New Issue