Merge pull request #9 from minenux/master-fix-areavolume-excedes

limit the altitude due it multiplies twice and generated a big area
master
Tai Kedzierski 2021-10-22 12:21:30 +01:00 committed by GitHub
commit 60795a69e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -52,7 +52,11 @@ end
function rspawn:get_positions_for(pos, radius)
local breadth = radius
local altitude = radius*2
local altitude = water_level + radius
if rspawn.spawnanywhere then
altitude = radius
end
local pos1 = {x=pos.x-breadth, y=pos.y, z=pos.z-breadth}
local pos2 = {x=pos.x+breadth, y=pos.y+altitude, z=pos.z+breadth}