don't shoot down area owners

This commit is contained in:
OgelGames 2020-05-31 20:00:06 +10:00
parent c01518913b
commit a814fbe160

View File

@ -154,10 +154,16 @@ hangglider.can_fly = function (pname, pos)
end
end
if areas and hangglider.flak then
local flak = false
local owners = {}
for _, area in pairs(areas:getAreasAtPos(pos)) do
if area.flak then
return false
flak = true
end
owners[area.owner] = true
end
if flak and not owners[pname] then
return false
end
end
return true