mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Fix error when calling minetest.node_punch without a pointed_thing
This commit is contained in:
parent
859287b027
commit
c9b64206f9
1 changed files with 1 additions and 1 deletions
|
@ -367,7 +367,7 @@ function minetest.node_punch(pos, node, puncher, pointed_thing)
|
||||||
-- Copy pos and node because callback can modify them
|
-- Copy pos and node because callback can modify them
|
||||||
local pos_copy = vector.new(pos)
|
local pos_copy = vector.new(pos)
|
||||||
local node_copy = {name=node.name, param1=node.param1, param2=node.param2}
|
local node_copy = {name=node.name, param1=node.param1, param2=node.param2}
|
||||||
local pointed_thing_copy = copy_pointed_thing(pointed_thing)
|
local pointed_thing_copy = pointed_thing and copy_pointed_thing(pointed_thing) or nil
|
||||||
callback(pos_copy, node_copy, puncher, pointed_thing_copy)
|
callback(pos_copy, node_copy, puncher, pointed_thing_copy)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue