diff --git a/mods/doors/init.lua b/mods/doors/init.lua index bd3e6998..c0fd5bff 100644 --- a/mods/doors/init.lua +++ b/mods/doors/init.lua @@ -132,10 +132,19 @@ local transform = { function _doors.door_toggle(pos, clicker) local meta = minetest.get_meta(pos) - local state = meta:get_int("state") local def = minetest.registered_nodes[minetest.get_node(pos).name] local name = def.door.name + local state = meta:get_string("state") + if state == "" then + -- fix up lvm-placed right-hinged doors, default closed + if minetest.get_node(pos).name:sub(-2) == "_b" then + state = 2 + end + else + state = tonumber(state) + end + if clicker and not minetest.check_player_privs(clicker, "protection_bypass") then local owner = meta:get_string("doors_owner") if owner ~= "" then