mirror of
https://github.com/minetest-mods/throwing.git
synced 2025-01-25 01:20:21 +01:00
Remove useless calls to minetest.is_protected in on_hit functions
(Already checked in the generic API)
This commit is contained in:
parent
ad966cf06d
commit
c5d7e77828
@ -49,9 +49,6 @@ if get_setting("dig_arrow") then
|
|||||||
if not node then
|
if not node then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if minetest.is_protected(pos, hitter:get_player_name()) then
|
|
||||||
return false, "Area is protected"
|
|
||||||
end
|
|
||||||
return minetest.dig_node(pos)
|
return minetest.dig_node(pos)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
@ -115,9 +112,6 @@ if get_setting("build_arrow") then
|
|||||||
minetest.log("warning", "[throwing] BUG: node at last_pos was not air")
|
minetest.log("warning", "[throwing] BUG: node at last_pos was not air")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if minetest.is_protected(last_pos, hitter:get_player_name()) then
|
|
||||||
return false, "Area is protected"
|
|
||||||
end
|
|
||||||
return minetest.place_node(last_pos, {name="default:obsidian_glass"})
|
return minetest.place_node(last_pos, {name="default:obsidian_glass"})
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user