Fix certain connected nodeboxes crashing when falling

fixes #10695
This commit is contained in:
sfan5 2020-12-04 11:27:15 +01:00 committed by Nils Dagsson Moskopp
parent eb3dea562b
commit c41e6a9648
Signed by: erle
GPG Key ID: A3BC671C35191080
1 changed files with 1 additions and 1 deletions

View File

@ -130,7 +130,7 @@ core.register_entity(":__builtin:falling_node", {
-- Set collision box (certain nodeboxes only for now)
local nb_types = {fixed=true, leveled=true, connected=true}
if def.drawtype == "nodebox" and def.node_box and
nb_types[def.node_box.type] then
nb_types[def.node_box.type] and def.node_box.fixed then
local box = table.copy(def.node_box.fixed)
if type(box[1]) == "table" then
box = #box == 1 and box[1] or nil -- We can only use a single box