forked from nalc/areas
Copy positions to avaoid multiple references
This commit is contained in:
parent
913e1fe6b3
commit
9871caf1e2
3
pos.lua
3
pos.lua
@ -123,6 +123,9 @@ function areas:getPos(playerName)
|
||||
if not (pos1 and pos2) then
|
||||
return nil
|
||||
end
|
||||
-- Copy positions so that the area table doesn't contain multiple
|
||||
-- references to the same position.
|
||||
pos1, pos2 = vector.new(pos1), vector.new(pos2)
|
||||
return areas:sortPos(pos1, pos2)
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user