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:
parent
45d63343a6
commit
39e7b7110d
9
init.lua
9
init.lua
@ -302,10 +302,11 @@ 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
|
||||
minetest.set_node(new_pos, {name = "fire:basic_flame"})
|
||||
break
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user