projects
/
zefram
/
minetest
/
pipeworks.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
29da899
)
catch a similar nil condition in the node breaker
author
Vanessa Ezekowitz
<vanessaezekowitz@gmail.com>
Wed, 11 Dec 2013 03:39:53 +0000
(22:39 -0500)
committer
Vanessa Ezekowitz
<vanessaezekowitz@gmail.com>
Wed, 11 Dec 2013 03:39:53 +0000
(22:39 -0500)
node_breaker.lua
patch
|
blob
|
history
diff --git
a/node_breaker.lua
b/node_breaker.lua
index 23ff533b46a82dfbe7b921741b7fb235b756d92e..bffb27cb9f21d5b8f418dfbcc3ffabf9d1e2fdfc 100644
(file)
--- a/
node_breaker.lua
+++ b/
node_breaker.lua
@@
-102,6
+102,8
@@
end
function break_node (pos, facedir)
--locate the outgoing velocity, front, and back of the node via facedir_to_dir
+ if type(facedir) ~= "number" or facedir < 0 or facedir > 23 then return end
+
local vel = minetest.facedir_to_dir(facedir);
local front = {x=pos.x - vel.x, y=pos.y - vel.y, z=pos.z - vel.z}
local back = {x=pos.x + vel.x, y=pos.y + vel.y, z=pos.z + vel.z}