mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-25 04:13:44 +01:00
Fix villager crash when opening iron doors
This commit is contained in:
parent
43a343a832
commit
ee9cc5341b
@ -2312,9 +2312,9 @@ local function check_doors(self)
|
|||||||
local def = minetest.registered_nodes[n.name]
|
local def = minetest.registered_nodes[n.name]
|
||||||
local closed = n.name:find("_b_1")
|
local closed = n.name:find("_b_1")
|
||||||
if t < 0.3 or t > 0.8 then
|
if t < 0.3 or t > 0.8 then
|
||||||
if not closed then def.on_rightclick(d,n,self) end
|
if not closed and def.on_rightclick then def.on_rightclick(d,n,self) end
|
||||||
else
|
else
|
||||||
if closed then def.on_rightclick(d,n,self) end
|
if closed and def.on_rightclick then def.on_rightclick(d,n,self) end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user