From 0beedaf539a19fae087832da698f6284eab637f9 Mon Sep 17 00:00:00 2001 From: jp Date: Sun, 15 Nov 2015 20:39:27 +0100 Subject: [PATCH] Missing checks --- nodes.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nodes.lua b/nodes.lua index d3c6d04..c5fde0f 100644 --- a/nodes.lua +++ b/nodes.lua @@ -207,7 +207,7 @@ xdecor.register("chair", { for _, p in pairs(objs) do if p:get_player_name() ~= nil or default.player_attached[pname] == true or not - player:is_player() then + player or not player:is_player() then return false end end @@ -282,7 +282,7 @@ xdecor.register("cushion", { local objs = minetest.get_objects_inside_radius(pos, 0.5) for _, p in pairs(objs) do if p:get_player_name() ~= nil or node.param2 > 3 or not - clicker:is_player() then return end + clicker or not clicker:is_player() then return end end pos.y = pos.y + 0 sit(pos, node, clicker)