Skip to content

Commit

Permalink
check areas only for flak
Browse files Browse the repository at this point in the history
  • Loading branch information
BuckarooBanzay committed Feb 13, 2020
1 parent 206704f commit e2d8721
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,10 @@ hangglider.can_fly = function (pname, pos)
return (minetest.check_player_privs(pname, {protection_bypass=true}) or wardzones.checkPlayerZoneAccess(pname, zone) or not zone["data"]["no_fly"])
end
end
if areas and minetest.is_protected(vector.round(pos), pname) then
if hangglider.flak then
for id, area in pairs(areas:getAreasAtPos(pos)) do
if area.flak then
return false
end
if areas and hangglider.flak then
for id, area in pairs(areas:getAreasAtPos(pos)) do
if area.flak then
return false
end
end
end
Expand Down

0 comments on commit e2d8721

Please sign in to comment.