Reduce sapawn range to 1000m

This commit is contained in:
2025-01-03 22:29:20 +08:00
parent fb5ea45a4d
commit 49eac0a7ed
+3 -2
View File
@@ -471,7 +471,7 @@ do
local spawnPoint = {}
for i=1,100,1 do
local tPoint = Utils.vecTranslate(centerPoint,tDir,math.random(100,2000)) --Spawn range
local tPoint = Utils.vecTranslate(centerPoint,tDir,math.random(100,1000)) --Spawn range
if Utils.pointInPolygon(tPoint,sectionZone.points) then
if land.getSurfaceType(tPoint) ~= land.SurfaceType.WATER or land.getSurfaceType(tPoint) ~= land.SurfaceType.SHALLOW_WATER then
spawnPoint = tPoint
@@ -482,7 +482,8 @@ do
if not spawnPoint then
spawnPoint.x = centerPoint.x+50
spawnPoint.y = centerPoint.z+50 or centerPoint.y+50
spawnPoint.y = centerPoint.z or centerPoint.y
spawnPoint.y = spawnPoint.y+50
end
groupData.units[k].x = spawnPoint.x