Compare commits

...
9 Commits
5 changed files with 30 additions and 26 deletions
Binary file not shown.
View File
+4 -4
View File
@@ -15,7 +15,7 @@ AARTanker = {
TACAN_Mode = 'X',
Alt = 10000/3.28,
Speed = 250/1.944,
Speed = 270/1.944,
},
['KC135_High'] = {
@@ -30,7 +30,7 @@ AARTanker = {
TACAN_Mode = 'X',
Alt = 16000/3.28,
Speed = 340/1.944,
Speed = 270/1.944,
},
['KC135MPRS'] = {
@@ -45,7 +45,7 @@ AARTanker = {
TACAN_Mode = 'X',
Alt = 14000/3.28,
Speed = 340/1.944,
Speed = 270/1.944,
},
['KC130'] = {
@@ -60,7 +60,7 @@ AARTanker = {
TACAN_Mode = 'X',
Alt = 11000/3.28,
Speed = 350/1.944,
Speed = 270/1.944,
},
}
+14 -13
View File
@@ -149,21 +149,22 @@ do
-- setmetatable(obj,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, time)
local carrier = vars.context
carrier:setTACAN()
carrier:InitBeacons()
return time+20
end,{context = obj},timer.getTime()+5)
obj:setMorse()
obj:setICLS()
obj:setLink4()
obj:setACLS(true)
obj:setATC()
-- timer.scheduleFunction(function (vars)
-- local carrier = vars.context
-- carrier:setTACAN()
-- carrier:setICLS()
-- end,{context = obj},timer.getTime()+20)
-- obj:setMorse()
-- obj:setLink4()
-- obj:setATC()
-- obj:setTACAN()
env.info('BAirboss - New Carrier: '..carrierUnitName)
@@ -233,7 +234,7 @@ do
--Calculate wind speed on runway in knots. If wind speed < 25 knots, try to make it 25 knots on deck.
if windSpeed <= 20/1.944 then
carrierSpeed = 25/1.944-windSpeed
carrierSpeed = 20/1.944-windSpeed
end
-- Find available waypoint and path.
+11 -8
View File
@@ -124,6 +124,9 @@ do
self.removePlayerProfile(playerName)
end
end
if not playerUnit then
self.removePlayerProfile(playerName)
end
if data.activeTarget then
if data.activeTarget:isExist() then
@@ -350,8 +353,11 @@ do
self.playerList[playerName] = nil
local leaveText = Localizations:translate('You have left rang area.','cn')
trigger.action.outTextForGroup(self.playerList[playerName].groupID,leaveText,10)
-- local leaveText = Localizations:translate('You have left rang area.','cn')
-- if self.playerList[playerName].group:isExist() then
-- trigger.action.outTextForGroup(self.playerList[playerName].groupID,leaveText,10)
-- end
end
function Range:activeTartgets(playerName,sectionType,targetType,AAType,Move)
@@ -466,9 +472,11 @@ do
for k=2,#groupData.units,1 do
local tDir = math.random(0,359)
local spawnPoint = {}
spawnPoint.x = centerPoint.x+200
spawnPoint.y = centerPoint.z or centerPoint.y
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
@@ -477,11 +485,6 @@ do
end
end
if not spawnPoint then
spawnPoint.x = centerPoint.x+50
spawnPoint.y = centerPoint.z+50 or centerPoint.y+50
end
groupData.units[k].x = spawnPoint.x
groupData.units[k].y = spawnPoint.z or spawnPoint.y
end