#220 Fix a crash in mcl_comparators

This commit is contained in:
kay27 2022-02-21 05:51:00 +04:00
parent 386460e90c
commit 1a4ec50939
1 changed files with 3 additions and 1 deletions

View File

@ -43,7 +43,9 @@ end
local function comparator_activate(pos, node)
local def = minetest.registered_nodes[node.name]
minetest.swap_node(pos, { name = def.comparator_onstate, param2 = node.param2 })
local on_state = def.comparator_onstate
if not on_state then return end
minetest.swap_node(pos, { name = on_state, param2 = node.param2 })
minetest.after(0.1, comparator_turnon , {pos = pos, node = node})
end