mirror of
https://github.com/minetest-mods/areas.git
synced 2025-07-07 02:20:22 +02:00
make the change instead in hud.lua
This commit is contained in:
4
api.lua
4
api.lua
@ -18,10 +18,6 @@ end
|
||||
function areas:getAreasAtPos(pos)
|
||||
local res = {}
|
||||
|
||||
pos = vector.apply(pos, function(p)
|
||||
return math.max(math.min(p, 2147483), -2147483)
|
||||
end)
|
||||
|
||||
if self.store then
|
||||
local a = self.store:get_areas_for_pos(pos, false, true)
|
||||
for store_id, store_area in pairs(a) do
|
||||
|
3
hud.lua
3
hud.lua
@ -6,6 +6,9 @@ minetest.register_globalstep(function(dtime)
|
||||
for _, player in pairs(minetest.get_connected_players()) do
|
||||
local name = player:get_player_name()
|
||||
local pos = vector.round(player:getpos())
|
||||
pos = vector.apply(pos, function(p)
|
||||
return math.max(math.min(p, 2147483), -2147483)
|
||||
end)
|
||||
local areaStrings = {}
|
||||
|
||||
for id, area in pairs(areas:getAreasAtPos(pos)) do
|
||||
|
Reference in New Issue
Block a user