forked from mtcontrib/hangglider
don't shoot down area owners
This commit is contained in:
parent
c01518913b
commit
a814fbe160
10
init.lua
10
init.lua
@ -153,11 +153,17 @@ hangglider.can_fly = function (pname, pos)
|
|||||||
wardzones.checkPlayerZoneAccess(pname, zone) or not zone["data"]["no_fly"])
|
wardzones.checkPlayerZoneAccess(pname, zone) or not zone["data"]["no_fly"])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if areas and hangglider.flak then
|
if areas and hangglider.flak then
|
||||||
|
local flak = false
|
||||||
|
local owners = {}
|
||||||
for _, area in pairs(areas:getAreasAtPos(pos)) do
|
for _, area in pairs(areas:getAreasAtPos(pos)) do
|
||||||
if area.flak then
|
if area.flak then
|
||||||
return false
|
flak = true
|
||||||
end
|
end
|
||||||
|
owners[area.owner] = true
|
||||||
|
end
|
||||||
|
if flak and not owners[pname] then
|
||||||
|
return false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
|
Loading…
Reference in New Issue
Block a user