mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-18 06:19:34 +01:00
Fix crash when using stairs near unknown nodes
This commit is contained in:
parent
fa3ca02906
commit
ddaeac8273
1 changed files with 6 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue