projects
/
zefram
/
minetest
/
minetest_engine.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
859287b
)
Fix error when calling minetest.node_punch without a pointed_thing
author
ShadowNinja
<shadowninja@minetest.net>
Tue, 11 Mar 2014 16:59:02 +0000
(12:59 -0400)
committer
ShadowNinja
<shadowninja@minetest.net>
Tue, 11 Mar 2014 17:00:16 +0000
(13:00 -0400)
builtin/item.lua
patch
|
blob
|
history
diff --git
a/builtin/item.lua
b/builtin/item.lua
index de546c2e7eab4c29dd0b4e17bec0ecee3ebdd973..002c14f5ef79e5b6fa951e0e15b3dd41d6ef97bb 100644
(file)
--- a/
builtin/item.lua
+++ b/
builtin/item.lua
@@
-367,7
+367,7
@@
function minetest.node_punch(pos, node, puncher, pointed_thing)
-- Copy pos and node because callback can modify them
local pos_copy = vector.new(pos)
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)
end
end