Fix up some minetest.is_protected functions

This commit is contained in:
LoneWolfHT 2021-01-06 09:44:54 -08:00
parent 72d27ca1ce
commit 8c33103e4c
2 changed files with 6 additions and 6 deletions

View file

@ -77,9 +77,9 @@ end
local old_is_protected = minetest.is_protected
local r = ctf.setting("flag.nobuild_radius")
local rs = r * r
function minetest.is_protected(pos, name)
function minetest.is_protected(pos, name, ...)
if r <= 0 or rs == 0 then
return old_is_protected(pos, name)
return old_is_protected(pos, name, ...)
end
local flag, distSQ = ctf_flag.get_nearest(pos)
@ -88,7 +88,7 @@ function minetest.is_protected(pos, name)
"Too close to the flag to build! Leave at least " .. r .. " blocks around the flag.")
return true
else
return old_is_protected(pos, name)
return old_is_protected(pos, name, ...)
end
end

View file

@ -214,9 +214,9 @@ end
if minetest.get_modpath("ctf") then
local old_is_protected = minetest.is_protected
function minetest.is_protected(pos, name)
function minetest.is_protected(pos, name, ...)
if ctf_match.build_timer <= 0 then
return old_is_protected(pos, name)
return old_is_protected(pos, name, ...)
end
local tname = ctf.player(name).team
@ -225,7 +225,7 @@ if minetest.get_modpath("ctf") then
minetest.chat_send_player(name, "Can't dig beyond the barrier!")
return true
else
return old_is_protected(pos, name)
return old_is_protected(pos, name, ...)
end
end