function activateTarget(): add default spawnPoint value.
This commit is contained in:
Binary file not shown.
+6
-7
@@ -124,6 +124,9 @@ do
|
|||||||
self.removePlayerProfile(playerName)
|
self.removePlayerProfile(playerName)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
if not playerUnit then
|
||||||
|
self.removePlayerProfile(playerName)
|
||||||
|
end
|
||||||
|
|
||||||
if data.activeTarget then
|
if data.activeTarget then
|
||||||
if data.activeTarget:isExist() then
|
if data.activeTarget:isExist() then
|
||||||
@@ -350,7 +353,7 @@ do
|
|||||||
|
|
||||||
self.playerList[playerName] = nil
|
self.playerList[playerName] = nil
|
||||||
|
|
||||||
local leaveText = Localizations:translate('You have left rang area.','cn')
|
-- local leaveText = Localizations:translate('You have left rang area.','cn')
|
||||||
|
|
||||||
-- if self.playerList[playerName].group:isExist() then
|
-- if self.playerList[playerName].group:isExist() then
|
||||||
-- trigger.action.outTextForGroup(self.playerList[playerName].groupID,leaveText,10)
|
-- trigger.action.outTextForGroup(self.playerList[playerName].groupID,leaveText,10)
|
||||||
@@ -469,6 +472,8 @@ do
|
|||||||
for k=2,#groupData.units,1 do
|
for k=2,#groupData.units,1 do
|
||||||
local tDir = math.random(0,359)
|
local tDir = math.random(0,359)
|
||||||
local spawnPoint = {}
|
local spawnPoint = {}
|
||||||
|
spawnPoint.x = centerPoint.x+200
|
||||||
|
spawnPoint.y = centerPoint.z or centerPoint.y
|
||||||
|
|
||||||
for i=1,100,1 do
|
for i=1,100,1 do
|
||||||
local tPoint = Utils.vecTranslate(centerPoint,tDir,math.random(100,1000)) --Spawn range
|
local tPoint = Utils.vecTranslate(centerPoint,tDir,math.random(100,1000)) --Spawn range
|
||||||
@@ -480,12 +485,6 @@ do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if not spawnPoint then
|
|
||||||
spawnPoint.x = centerPoint.x+50
|
|
||||||
spawnPoint.y = centerPoint.z or centerPoint.y
|
|
||||||
spawnPoint.y = spawnPoint.y+50
|
|
||||||
end
|
|
||||||
|
|
||||||
groupData.units[k].x = spawnPoint.x
|
groupData.units[k].x = spawnPoint.x
|
||||||
groupData.units[k].y = spawnPoint.z or spawnPoint.y
|
groupData.units[k].y = spawnPoint.z or spawnPoint.y
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user