diff options
author | Gabriel Pérez-Cerezo <gabriel@gpcf.eu> | 2019-10-17 18:31:27 +0200 |
---|---|---|
committer | Gabriel Pérez-Cerezo <gabriel@gpcf.eu> | 2019-10-17 18:31:27 +0200 |
commit | b6e4fd8f6828c6f77c767cee486c06a03becb30a (patch) | |
tree | 41319e6556eeba204cedcd311beb72b14dff1375 | |
parent | 206704ffabcdddc61150ed798c88add9965a110d (diff) | |
download | hangglider-b6e4fd8f6828c6f77c767cee486c06a03becb30a.tar.gz hangglider-b6e4fd8f6828c6f77c767cee486c06a03becb30a.tar.bz2 hangglider-b6e4fd8f6828c6f77c767cee486c06a03becb30a.zip |
Fix flak
flak flag is areas-specific, so don't check for other protection mods.
-rw-r--r-- | init.lua | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -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 |