Skip to content
Browse files
Fix broken door protection.
A previous fix overwrote the `def` variable during registration,
causing protected doors no longer to be placed with protection.
  • Loading branch information
sofar authored and paramat committed Feb 23, 2016
1 parent 4c9944b commit 6b055ae18ad6af800bd953886547477b0ac3c1eb
Showing 1 changed file with 6 additions and 6 deletions.
@@ -209,19 +209,19 @@ function doors.register(name, def)

local node = minetest.get_node(pointed_thing.under)
local def = minetest.registered_nodes[]
if def and def.on_rightclick then
return def.on_rightclick(pointed_thing.under,
local pdef = minetest.registered_nodes[]
if pdef and pdef.on_rightclick then
return pdef.on_rightclick(pointed_thing.under,
node, placer, itemstack)

if def and def.buildable_to then
if pdef and pdef.buildable_to then
pos = pointed_thing.under
pos = pointed_thing.above
node = minetest.get_node(pos)
def = minetest.registered_nodes[]
if not def or not def.buildable_to then
pdef = minetest.registered_nodes[]
if not pdef or not pdef.buildable_to then
return itemstack

0 comments on commit 6b055ae

Please sign in to comment.