mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-04-30 13:11:41 -04:00
Do what it should do
This commit is contained in:
parent
ee30e3af28
commit
cd3920c61b
1 changed files with 3 additions and 2 deletions
|
@ -294,12 +294,13 @@ minetest.register_abm({
|
|||
--
|
||||
|
||||
local in_dig_up = false
|
||||
local mapgen_limit = tonumber(minetest.settings:get("mapgen_limit")) or 31007
|
||||
function default.dig_up(pos, node, digger, max_height)
|
||||
if in_dig_up then return end -- Avoid excess calls
|
||||
if digger == nil then return end
|
||||
max_height = max_height or tonumber(minetest.settings:get("mapgen_limit")) or 31007
|
||||
max_height = max_height or mapgen_limit
|
||||
|
||||
for y = pos.y + 1, max_height do
|
||||
for y = pos.y + 1, math.min(pos.y + max_height, mapgen_limit) do
|
||||
local up_pos = { x = pos.x, y = y, z = pos.z}
|
||||
local up_node = minetest.get_node(up_pos)
|
||||
if up_node.name == node.name then
|
||||
|
|
Loading…
Add table
Reference in a new issue