diff options
author | ShadowNinja <shadowninja@minetest.net> | 2014-07-15 15:41:18 -0400 |
---|---|---|
committer | ShadowNinja <shadowninja@minetest.net> | 2014-07-15 15:41:18 -0400 |
commit | 9871caf1e28e3a22bba1323fe6a976a7faedde44 (patch) | |
tree | 9dcaf3f9eca59e7b7cd28ff58c0995b086d3803d | |
parent | 913e1fe6b3f46ab6163067fab44fe2cc77363803 (diff) |
Copy positions to avaoid multiple references
-rw-r--r-- | pos.lua | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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 |