Compare commits

...
2 Commits
Author SHA1 Message Date
XiaoChen cb05bd0925 Change target unit spawn range to 100m-2000m 2025-01-03 18:40:53 +08:00
XiaoChen 3e600ead0d Fix bug on setting TACAN at MP server. 2025-01-03 18:38:56 +08:00
2 changed files with 18 additions and 13 deletions
+17 -12
View File
@@ -132,8 +132,8 @@ do
return return
end end
-- local obj = Utils.deepCopy(self) local obj = Utils.deepCopy(self)
local obj = {} -- local obj = {}
obj.carrierUnit = Unit.getByName(carrierUnitName) obj.carrierUnit = Unit.getByName(carrierUnitName)
@@ -146,20 +146,25 @@ do
return nil return nil
end end
setmetatable(obj,self) -- setmetatable(obj,self)
self.__index = self -- self.__index = self
-- timer.scheduleFunction(function (vars)
-- local carrier = vars.context
-- carrier:InitBeacons()
-- end,{context = obj},timer.getTime()+5)
timer.scheduleFunction(function (vars) timer.scheduleFunction(function (vars)
local carrier = vars.context local carrier = vars.context
carrier:InitBeacons() carrier:setTACAN()
end,{context = obj},timer.getTime()+5) end,{context = obj},timer.getTime()+5)
-- self:setMorse() obj:setMorse()
-- self:setTACAN() obj:setICLS()
-- self:setICLS() obj:setLink4()
-- self:setLink4() obj:setACLS(true)
-- self:setACLS(true) obj:setATC()
-- self:setATC() -- obj:setTACAN()
env.info('BAirboss - New Carrier: '..carrierUnitName) env.info('BAirboss - New Carrier: '..carrierUnitName)
return obj return obj
@@ -467,8 +472,8 @@ do
self:setICLS() self:setICLS()
self:setLink4() self:setLink4()
self:setACLS(true) self:setACLS(true)
self:setATC()
self:setTACAN() self:setTACAN()
self:setATC()
return self return self
end end
+1 -1
View File
@@ -468,7 +468,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(10,500)) local tPoint = Utils.vecTranslate(centerPoint,tDir,math.random(100,2000)) --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