mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-04-30 13:11:41 -04:00
Use vector.offset
Co-authored-by: sfan5 <sfan5@live.de>
This commit is contained in:
parent
b49153cf12
commit
eb68b33ba9
1 changed files with 2 additions and 2 deletions
|
@ -306,8 +306,8 @@ function default.dig_up(pos, node, digger, max_height)
|
||||||
max_height = max_height or 100
|
max_height = max_height or 100
|
||||||
|
|
||||||
in_dig_up = true
|
in_dig_up = true
|
||||||
for y = pos.y + 1, pos.y + max_height do
|
for y = 1, max_height do
|
||||||
local up_pos = vector.new(pos.x, y, pos.z)
|
local up_pos = vector.offset(pos, 0, y, 0)
|
||||||
local up_node = minetest.get_node(up_pos)
|
local up_node = minetest.get_node(up_pos)
|
||||||
if up_node.name ~= node.name then
|
if up_node.name ~= node.name then
|
||||||
break
|
break
|
||||||
|
|
Loading…
Add table
Reference in a new issue