mirror of
https://github.com/minetest/minetest_game.git
synced 2024-12-22 23:10:17 +01:00
Fix bug rotating unknown node
This fixes a bug what crashes game when rotating an unknown node.
This commit is contained in:
parent
079b796031
commit
20053d6b52
@ -36,7 +36,7 @@ local function screwdriver_handler(itemstack, user, pointed_thing, mode)
|
|||||||
local node = minetest.get_node(pos)
|
local node = minetest.get_node(pos)
|
||||||
local ndef = minetest.registered_nodes[node.name]
|
local ndef = minetest.registered_nodes[node.name]
|
||||||
-- verify node is facedir (expected to be rotatable)
|
-- verify node is facedir (expected to be rotatable)
|
||||||
if ndef.paramtype2 ~= "facedir" then
|
if not ndef or ndef.paramtype2 ~= "facedir" then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
-- Compute param2
|
-- Compute param2
|
||||||
|
Loading…
Reference in New Issue
Block a user