Compare commits

...

1 Commits

Author SHA1 Message Date
cora 97e9dae7c6 Fix portal removal stack overflow 2022-02-14 22:12:11 +01:00
1 changed files with 12 additions and 6 deletions

View File

@ -232,14 +232,20 @@ local function destroy_nether_portal(pos, node)
return return
end end
if orientation == 0 then if orientation == 0 then
check_remove({x = pos.x - 1, y = pos.y, z = pos.z}, 0) minetest.after(0,function()
check_remove({x = pos.x + 1, y = pos.y, z = pos.z}, 0) check_remove({x = pos.x - 1, y = pos.y, z = pos.z}, 0)
check_remove({x = pos.x + 1, y = pos.y, z = pos.z}, 0)
end)
else else
check_remove({x = pos.x, y = pos.y, z = pos.z - 1}, 1) minetest.after(0,function()
check_remove({x = pos.x, y = pos.y, z = pos.z + 1}, 1) check_remove({x = pos.x, y = pos.y, z = pos.z - 1}, 1)
check_remove({x = pos.x, y = pos.y, z = pos.z + 1}, 1)
end)
end end
check_remove({x = pos.x, y = pos.y - 1, z = pos.z}) minetest.after(0,function()
check_remove({x = pos.x, y = pos.y + 1, z = pos.z}) check_remove({x = pos.x, y = pos.y - 1, z = pos.z})
check_remove({x = pos.x, y = pos.y + 1, z = pos.z})
end)
end end
local on_rotate local on_rotate