Restrict horizontal range of tesseracts.
This commit is contained in:
parent
925378daa1
commit
f860bfa6b7
1 changed files with 11 additions and 11 deletions
|
@ -30,15 +30,15 @@ local function teleporter(user, area, power)
|
||||||
}
|
}
|
||||||
elseif area == 'hell' then
|
elseif area == 'hell' then
|
||||||
newpos = {
|
newpos = {
|
||||||
x = (math.random(2)*2-3)*(math.random(math.floor(max_depth/6))+power*math.floor(max_depth/6)),
|
x = pos.x,
|
||||||
y = fun_caves.underzones[({'Caina','Phlegethos','Dis','Minauros', 'Phlegethos','Styx'})[power+1]].ceiling-30,
|
y = fun_caves.underzones[({'Caina','Phlegethos','Dis','Minauros', 'Phlegethos','Styx'})[power+1]].ceiling-30,
|
||||||
z = (math.random(2)*2-3)*(math.random(math.floor(max_depth/6))+power*math.floor(max_depth/6))
|
z = pos.z,
|
||||||
}
|
}
|
||||||
elseif area == 'sky' then
|
elseif area == 'sky' then
|
||||||
newpos = {
|
newpos = {
|
||||||
x = (math.random(2)*2-3)*(math.random(math.floor(max_depth/6))+power*math.floor(max_depth/6)),
|
x = pos.x,
|
||||||
y = ({4368, 8768, 13168, 4368, 4368, 4368})[power+1]+76,
|
y = ({4368, 8768, 13168, 4368, 4368, 4368})[power+1]+76,
|
||||||
z = (math.random(2)*2-3)*(math.random(math.floor(max_depth/6))+power*math.floor(max_depth/6))
|
z = pos.z,
|
||||||
}
|
}
|
||||||
elseif area == 'dungeon' then
|
elseif area == 'dungeon' then
|
||||||
newpos = {}
|
newpos = {}
|
||||||
|
@ -50,11 +50,11 @@ local function teleporter(user, area, power)
|
||||||
-- check below the top level
|
-- check below the top level
|
||||||
base_pos.y = base_pos.y - (base_pos.y + 32) % 80 - 12
|
base_pos.y = base_pos.y - (base_pos.y + 32) % 80 - 12
|
||||||
|
|
||||||
for i = 1, 1000 do
|
for i = 1, 4000 do
|
||||||
newpos = {
|
newpos = {
|
||||||
x = (math.random(2)*2-3)*(math.random(math.floor(max_depth/6))+power*math.floor(max_depth/6)),
|
x = base_pos.x + (math.random(5) - math.random(5)) * 80,
|
||||||
y = base_pos.y - math.random(50) * 80,
|
y = base_pos.y - math.random(50) * 80,
|
||||||
z = (math.random(2)*2-3)*(math.random(math.floor(max_depth/6))+power*math.floor(max_depth/6))
|
z = base_pos.z + (math.random(5) - math.random(5)) * 80,
|
||||||
}
|
}
|
||||||
|
|
||||||
-- avoid walls
|
-- avoid walls
|
||||||
|
@ -87,9 +87,9 @@ local function teleporter(user, area, power)
|
||||||
local c1, c2
|
local c1, c2
|
||||||
for i = 1, 1000 do
|
for i = 1, 1000 do
|
||||||
newpos = {
|
newpos = {
|
||||||
x = (math.random(2)*2-3)*(math.random(math.floor(max_depth/6))+power*math.floor(max_depth/6)),
|
x = pos.x,
|
||||||
y = base_pos.y - math.random(50) * 80,
|
y = base_pos.y - math.random(50) * 80,
|
||||||
z = (math.random(2)*2-3)*(math.random(math.floor(max_depth/6))+power*math.floor(max_depth/6))
|
z = pos.z,
|
||||||
}
|
}
|
||||||
|
|
||||||
c1 = minetest.get_perlin(fun_caves.cave_noise_1):get3d(newpos)
|
c1 = minetest.get_perlin(fun_caves.cave_noise_1):get3d(newpos)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue