mirror of
https://github.com/minetest-mods/areas.git
synced 2025-07-07 10:30:23 +02:00
improve
This commit is contained in:
7
api.lua
7
api.lua
@ -18,10 +18,9 @@ end
|
|||||||
function areas:getAreasAtPos(pos)
|
function areas:getAreasAtPos(pos)
|
||||||
local res = {}
|
local res = {}
|
||||||
|
|
||||||
if math.abs(pos.x) > 2147483 or math.abs(pos.y) > 2147483 or
|
pos = vector.apply(pos, function(p)
|
||||||
math.abs(pos.z) > 2147483 then
|
return math.max(math.min(p, 2147483), -2147483)
|
||||||
return res
|
end)
|
||||||
end
|
|
||||||
|
|
||||||
if self.store then
|
if self.store then
|
||||||
local a = self.store:get_areas_for_pos(pos, false, true)
|
local a = self.store:get_areas_for_pos(pos, false, true)
|
||||||
|
Reference in New Issue
Block a user