From: Vanessa Ezekowitz Date: Wed, 11 Dec 2013 02:39:47 +0000 (-0500) Subject: More sanity checks on the nodeside() function, courtesy ShadowNinja X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=29da8992ec32e0123e971c4ffc98015fbc2ae3be;p=zefram%2Fminetest%2Fpipeworks.git More sanity checks on the nodeside() function, courtesy ShadowNinja --- diff --git a/autoplace_tubes.lua b/autoplace_tubes.lua index 4bb31bc..518caf8 100644 --- a/autoplace_tubes.lua +++ b/autoplace_tubes.lua @@ -28,7 +28,11 @@ end --a function for determining which side of the node we are on local function nodeside(node, tubedir) - if not tubedir or not node or not node.param2 then return "back" end + if not tubedir or + not node or + not (type(node.param2) == "number" and node.param2 > 0 and node.param2 < 23) then + return "back" + end --get a vector pointing back local backdir = minetest.facedir_to_dir(node.param2)