forked from mtcontrib/hangglider
check areas only for flak
fixes https://github.com/pandorabox-io/pandorabox.io/issues/377
This commit is contained in:
parent
206704ffab
commit
e2d8721a52
4
init.lua
4
init.lua
|
@ -152,15 +152,13 @@ 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"])
|
return (minetest.check_player_privs(pname, {protection_bypass=true}) or wardzones.checkPlayerZoneAccess(pname, zone) or not zone["data"]["no_fly"])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if areas and minetest.is_protected(vector.round(pos), pname) then
|
if areas and hangglider.flak then
|
||||||
if hangglider.flak then
|
|
||||||
for id, area in pairs(areas:getAreasAtPos(pos)) do
|
for id, area in pairs(areas:getAreasAtPos(pos)) do
|
||||||
if area.flak then
|
if area.flak then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user