1
0
Fork 0

Fix crash when using stairs near unknown nodes

objects
Wuzzy 2017-06-29 11:55:39 +02:00
parent fa3ca02906
commit ddaeac8273
1 changed files with 6 additions and 0 deletions

View File

@ -220,6 +220,9 @@ function mcstair.add(name, stairtiles)
if not v.connect then
local node = minetest.get_node(v.pos)
local node_def = minetest.registered_nodes[node.name]
if not node_def then
return
end
if node_def.stairs then
t[i].stairs = node_def.stairs
t[i].connect = stair_param_to_connect(get_stair_param(node), ceiling)
@ -369,6 +372,9 @@ function mcstair.add(name, stairtiles)
if not v.connect then
local node = minetest.get_node(v.pos)
local node_def = minetest.registered_nodes[node.name]
if not node_def then
return
end
if node_def.stairs then
t[i].stairs = node_def.stairs
t[i].connect = stair_param_to_connect(get_stair_param(node), ceiling)