hook bugfix

This commit is contained in:
Joachim Stolberg 2017-06-06 21:14:32 +02:00
parent d19e401fb5
commit 37479a77b7

@ -11,6 +11,7 @@
History:
2017-06-04 v0.01 first version
2017-06-06 v0.02 Hook bugfix
]]--
@ -311,9 +312,16 @@ minetest.register_node("towercrane:base", {
local height = meta:get_int("height")
local width = meta:get_int("width")
-- remove crane
if dir ~= nil and height ~= nil and width ~= nil then
dig_crane(pos, dir, height, width)
end
-- remove hook
local id = minetest.hash_node_position(pos)
if towercrane.id then
towercrane.id:remove()
towercrane.id = nil
end
end,
})
@ -383,8 +391,6 @@ minetest.register_node("towercrane:mast_ctrl_on", {
if towercrane.id then
towercrane.id:remove()
towercrane.id = nil
else
end
end,