summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua10
1 files changed, 4 insertions, 6 deletions
diff --git a/init.lua b/init.lua
index 97f463a..536a9dd 100644
--- a/init.lua
+++ b/init.lua
@@ -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 hangglider.flak and areas then
+ for id, area in pairs(areas:getAreasAtPos(pos)) do
+ if area.flak then
+ return false
end
end
end