Copy positions to avaoid multiple references

This commit is contained in:
ShadowNinja 2014-07-15 15:41:18 -04:00
parent 913e1fe6b3
commit 9871caf1e2
1 changed files with 3 additions and 0 deletions

View File

@ -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