Skip to content

Commit

Permalink
only remove near-beacon fly
Browse files Browse the repository at this point in the history
  • Loading branch information
BuckarooBanzay committed Feb 21, 2020
1 parent 5ca2f2f commit 0e8cf7e
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions fly.lua
Original file line number Diff line number Diff line change
@@ -1,19 +1,8 @@
local has_beacon_mod = minetest.get_modpath("beacon")
local use_player_monoids = minetest.global_exists("player_monoids")

local fly_near = {} -- [{ name="", distance=0 }]

local storage = minetest.get_mod_storage()
local global_fly_enabled = storage:get_int("global_fly") == 1

if has_beacon_mod then
table.insert(fly_near, {
name="beacon:greenbase",
distance=20
})
end


local player_can_fly = function(player)
local pos = player:get_pos()
for _, box in pairs(skybox.list) do
Expand All @@ -29,12 +18,6 @@ local player_can_fly = function(player)
end
end

for _, def in pairs(fly_near) do
if minetest.find_node_near(pos, def.distance, def.name) then
return true
end
end

return global_fly_enabled
end

Expand Down

0 comments on commit 0e8cf7e

Please sign in to comment.