Mapgen: prevent falling on new game
parent
17418ca498
commit
1c8917025c
|
@ -11,15 +11,15 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
|||
local c_startline = minetest.get_content_id("levelnodes:startline")
|
||||
|
||||
for z = minp.z, maxp.z do
|
||||
for y = minp.y, maxp.y do
|
||||
for x = minp.x, maxp.x do
|
||||
local pos = area:index(x, y, z)
|
||||
if y % 50 == 0 and x < 3 and x > 0 and z < 3 and z > 0 then
|
||||
data[pos] = c_startline
|
||||
end
|
||||
end
|
||||
for y = minp.y, maxp.y do
|
||||
for x = minp.x, maxp.x do
|
||||
local pos = area:index(x, y, z)
|
||||
if (y+1) % 50 == 0 and x < 2 and x > -2 and z < 2 and z > -2 then
|
||||
data[pos] = c_startline
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
vm:set_data(data)
|
||||
vm:set_lighting({day=0, night=0})
|
||||
|
|
Loading…
Reference in New Issue