1
0

fix null variable in check areas for balrog tool weapon

* fixed and closed: https://codeberg.org/minenux/mobs_balrog/issues/3
This commit is contained in:
mckaygerhard 2021-11-29 21:00:06 -05:00
parent 45d63343a6
commit 39e7b7110d

View File

@ -302,14 +302,15 @@ minetest.register_tool("mobs_balrog:balrog_whip", {
local nodeu = minetest.get_node({x = new_pos.x, y = new_pos.y - 1, z = new_pos.z})
local value = x * x + z * z
if value <= radius * radius + 1
and node.name == "air" and nodeu.name ~= "air"
and not minetest.is_protected(new_pos, name) then
and node.name == "air" and nodeu.name ~= "air" then
if not minetest.is_protected(new_pos, user:get_player_name()) then
minetest.set_node(new_pos, {name = "fire:basic_flame"})
break
end
end
end
end
end
if not minetest.setting_getbool("creative_mode") then
itemstack:add_wear(65535/49)
return itemstack