mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-30 06:43:45 +01:00
Fix crash when using stairs near unknown nodes
parent
fa3ca02906
commit
ddaeac8273
@ -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 New Issue
Block a user