mirror of
https://github.com/minetest-mods/areas.git
synced 2024-12-24 17:50:40 +01:00
fix posLimit(pos) to process and return a position table
This commit is contained in:
parent
630bdefd98
commit
9508a004d0
6
pos.lua
6
pos.lua
@ -130,7 +130,11 @@ function areas:getPos(playerName)
|
||||
end
|
||||
|
||||
local function posLimit(pos)
|
||||
return math.max(math.min(p, 31000), -31000)
|
||||
return {
|
||||
x = math.max(math.min(pos.x, 31000), -31000)
|
||||
y = math.max(math.min(pos.y, 31000), -31000)
|
||||
z = math.max(math.min(pos.z, 31000), -31000)
|
||||
}
|
||||
end
|
||||
|
||||
function areas:setPos1(playerName, pos)
|
||||
|
Loading…
Reference in New Issue
Block a user