Reduce sapawn range to 1000m
This commit is contained in:
+3
-2
@@ -471,7 +471,7 @@ do
|
|||||||
local spawnPoint = {}
|
local spawnPoint = {}
|
||||||
|
|
||||||
for i=1,100,1 do
|
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 Utils.pointInPolygon(tPoint,sectionZone.points) then
|
||||||
if land.getSurfaceType(tPoint) ~= land.SurfaceType.WATER or land.getSurfaceType(tPoint) ~= land.SurfaceType.SHALLOW_WATER then
|
if land.getSurfaceType(tPoint) ~= land.SurfaceType.WATER or land.getSurfaceType(tPoint) ~= land.SurfaceType.SHALLOW_WATER then
|
||||||
spawnPoint = tPoint
|
spawnPoint = tPoint
|
||||||
@@ -482,7 +482,8 @@ do
|
|||||||
|
|
||||||
if not spawnPoint then
|
if not spawnPoint then
|
||||||
spawnPoint.x = centerPoint.x+50
|
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
|
end
|
||||||
|
|
||||||
groupData.units[k].x = spawnPoint.x
|
groupData.units[k].x = spawnPoint.x
|
||||||
|
|||||||
Reference in New Issue
Block a user