mirror of
https://github.com/minetest-mods/areas.git
synced 2024-11-14 06:30:19 +01:00
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