Fixed flag placement issue

This commit is contained in:
BillyS 2019-03-08 01:02:41 +00:00
parent 8dbb0ab5d1
commit 2ae495a531

View File

@ -306,6 +306,12 @@ ctf_flag = {
return itemstack
end
local team, index = ctf.get_territory_owner(pos)
if team ~= nil then
minetest.chat_send_player(name, "You cannot place a flag in a protected area!")
return itemstack
end
local tplayer = ctf.player_or_nil(name)
if tplayer and ctf.team(tplayer.team) then
if ctf.player(name).auth == false then
@ -313,7 +319,7 @@ ctf_flag = {
return itemstack
end
local tname = tplayer.team
local tname = tplayer.team
local team = ctf.team(tplayer.team)
if elementsInTable(team.players) <= elementsInTable(team.flags) then