This commit is contained in:
Megaf 2014-06-22 23:43:40 +00:00
commit e056f87089
1 changed files with 9 additions and 7 deletions

View File

@ -2,6 +2,7 @@
-- Returns a list of areas that include the provided position
function areas:getAreasAtPos(pos)
local a = {}
if pos then
local px, py, pz = pos.x, pos.y, pos.z
for id, area in pairs(self.areas) do
local ap1, ap2 = area.pos1, area.pos2
@ -11,6 +12,7 @@ function areas:getAreasAtPos(pos)
a[id] = area
end
end
end
return a
end