Edited map limits

This commit is contained in:
TenPlus1 2015-09-08 10:24:29 +01:00
parent 7d9385d80a
commit 6dd10d6a8f

12
api.lua
View File

@ -1690,12 +1690,12 @@ end
-- check if within map limits (-30911 to 30927) -- check if within map limits (-30911 to 30927)
function within_limits(pos, radius) function within_limits(pos, radius)
if (pos.x - radius) > -30911 if (pos.x - radius) > -30913
and (pos.x + radius) < 30927 and (pos.x + radius) < 30928
and (pos.y - radius) > -30911 and (pos.y - radius) > -30913
and (pos.y + radius) < 30927 and (pos.y + radius) < 30928
and (pos.z - radius) > -30911 and (pos.z - radius) > -30913
and (pos.z + radius) < 30927 then and (pos.z + radius) < 30928 then
return true -- within limits return true -- within limits
end end
return false -- beyond limits return false -- beyond limits