mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge branch 'develop' into FF/OpsDev
This commit is contained in:
commit
f23416dfb8
@ -211,16 +211,6 @@ function DATABASE:FindStatic( StaticName )
|
|||||||
return StaticFound
|
return StaticFound
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Finds a AIRBASE based on the AirbaseName.
|
|
||||||
-- @param #DATABASE self
|
|
||||||
-- @param #string AirbaseName
|
|
||||||
-- @return Wrapper.Airbase#AIRBASE The found AIRBASE.
|
|
||||||
function DATABASE:FindAirbase( AirbaseName )
|
|
||||||
|
|
||||||
local AirbaseFound = self.AIRBASES[AirbaseName]
|
|
||||||
return AirbaseFound
|
|
||||||
end
|
|
||||||
|
|
||||||
--- Adds a Airbase based on the Airbase Name in the DATABASE.
|
--- Adds a Airbase based on the Airbase Name in the DATABASE.
|
||||||
-- @param #DATABASE self
|
-- @param #DATABASE self
|
||||||
-- @param #string AirbaseName The name of the airbase.
|
-- @param #string AirbaseName The name of the airbase.
|
||||||
|
|||||||
@ -825,7 +825,11 @@ do -- COORDINATE
|
|||||||
-- @param #COORDINATE TargetCoordinate The target COORDINATE.
|
-- @param #COORDINATE TargetCoordinate The target COORDINATE.
|
||||||
-- @return DCS#Vec3 DirectionVec3 The direction vector in Vec3 format.
|
-- @return DCS#Vec3 DirectionVec3 The direction vector in Vec3 format.
|
||||||
function COORDINATE:GetDirectionVec3( TargetCoordinate )
|
function COORDINATE:GetDirectionVec3( TargetCoordinate )
|
||||||
return { x = TargetCoordinate.x - self.x, y = TargetCoordinate.y - self.y, z = TargetCoordinate.z - self.z }
|
if TargetCoordinate then
|
||||||
|
return { x = TargetCoordinate.x - self.x, y = TargetCoordinate.y - self.y, z = TargetCoordinate.z - self.z }
|
||||||
|
else
|
||||||
|
return { x=0,y=0,z=0}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1382,9 +1382,9 @@ function ZONE:New( ZoneName )
|
|||||||
end
|
end
|
||||||
|
|
||||||
--- Find a zone in the _DATABASE using the name of the zone.
|
--- Find a zone in the _DATABASE using the name of the zone.
|
||||||
-- @param #ZONE_BASE self
|
-- @param #ZONE self
|
||||||
-- @param #string ZoneName The name of the zone.
|
-- @param #string ZoneName The name of the zone.
|
||||||
-- @return #ZONE_BASE self
|
-- @return #ZONE self
|
||||||
function ZONE:FindByName( ZoneName )
|
function ZONE:FindByName( ZoneName )
|
||||||
|
|
||||||
local ZoneFound = _DATABASE:FindZone( ZoneName )
|
local ZoneFound = _DATABASE:FindZone( ZoneName )
|
||||||
|
|||||||
@ -949,11 +949,14 @@ function PSEUDOATC:LocalAirports(GID, UID)
|
|||||||
for _,airbase in pairs(airports) do
|
for _,airbase in pairs(airports) do
|
||||||
|
|
||||||
local name=airbase:getName()
|
local name=airbase:getName()
|
||||||
local q=AIRBASE:FindByName(name):GetCoordinate()
|
local a=AIRBASE:FindByName(name)
|
||||||
local d=q:Get2DDistance(pos)
|
if a then
|
||||||
|
local q=a:GetCoordinate()
|
||||||
|
local d=q:Get2DDistance(pos)
|
||||||
|
|
||||||
-- Add to table.
|
-- Add to table.
|
||||||
table.insert(self.group[GID].player[UID].airports, {distance=d, name=name})
|
table.insert(self.group[GID].player[UID].airports, {distance=d, name=name})
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -1041,6 +1044,3 @@ function PSEUDOATC:_myname(unitname)
|
|||||||
|
|
||||||
return string.format("%s (%s)", csign, pname)
|
return string.format("%s (%s)", csign, pname)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1758,6 +1758,10 @@ function ATIS:onafterBroadcast(From, Event, To)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Wind
|
-- Wind
|
||||||
|
-- Adding a space after each digit of WINDFROM to convert this to aviation-speak for TTS via SRS
|
||||||
|
if self.useSRS then
|
||||||
|
WINDFROM = string.gsub(WINDFROM,".", "%1 ")
|
||||||
|
end
|
||||||
if self.metric then
|
if self.metric then
|
||||||
subtitle=string.format("Wind from %s at %s m/s", WINDFROM, WINDSPEED)
|
subtitle=string.format("Wind from %s at %s m/s", WINDFROM, WINDSPEED)
|
||||||
else
|
else
|
||||||
@ -2215,7 +2219,7 @@ function ATIS:onafterBroadcast(From, Event, To)
|
|||||||
|
|
||||||
-- TACAN
|
-- TACAN
|
||||||
if self.tacan then
|
if self.tacan then
|
||||||
subtitle=string.format("TACAN channel %dX", self.tacan)
|
subtitle=string.format("TACAN channel %dX Ray", self.tacan)
|
||||||
if not self.useSRS then
|
if not self.useSRS then
|
||||||
self:Transmission(ATIS.Sound.TACANChannel, 1.0, subtitle)
|
self:Transmission(ATIS.Sound.TACANChannel, 1.0, subtitle)
|
||||||
self.radioqueue:Number2Transmission(tostring(self.tacan), nil, 0.2)
|
self.radioqueue:Number2Transmission(tostring(self.tacan), nil, 0.2)
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
-- ===
|
-- ===
|
||||||
--
|
--
|
||||||
-- ### Author: **applevangelist**
|
-- ### Author: **applevangelist**
|
||||||
-- @date Last Update June 2022
|
-- @date Last Update July 2022
|
||||||
-- @module Ops.AWACS
|
-- @module Ops.AWACS
|
||||||
-- @image OPS_AWACS.jpg
|
-- @image OPS_AWACS.jpg
|
||||||
|
|
||||||
@ -107,6 +107,8 @@ do
|
|||||||
-- @field #number WindowsTTSPadding
|
-- @field #number WindowsTTSPadding
|
||||||
-- @field #boolean AllowMarkers
|
-- @field #boolean AllowMarkers
|
||||||
-- @field #string PlayerStationName
|
-- @field #string PlayerStationName
|
||||||
|
-- @field #boolean GCI Act as GCI
|
||||||
|
-- @field Wrapper.Group#GROUP GCIGroup EWR group object for GCI ops
|
||||||
-- @extends Core.Fsm#FSM
|
-- @extends Core.Fsm#FSM
|
||||||
|
|
||||||
|
|
||||||
@ -125,6 +127,12 @@ do
|
|||||||
-- ** References from ARN33396 ATP 3-52.4 (Sep 2021) (Combined Forces)
|
-- ** References from ARN33396 ATP 3-52.4 (Sep 2021) (Combined Forces)
|
||||||
-- ** References from CNATRA P-877 (Rev 12-20) (NAVY)
|
-- ** References from CNATRA P-877 (Rev 12-20) (NAVY)
|
||||||
-- * FSM events that the mission designer can hook into
|
-- * FSM events that the mission designer can hook into
|
||||||
|
-- * Can also be used as GCI Controller
|
||||||
|
--
|
||||||
|
-- ## 0 Note for Multiplayer Setup
|
||||||
|
--
|
||||||
|
-- Due to DCS limitations you need to set up a second, "normal" AWACS plane in multi-player/server environments to keep the EPLRS/DataLink going in these environments.
|
||||||
|
-- Though working in single player, the situational awareness screens of the e.g. F14/16/18 will else not receive datalink targets.
|
||||||
--
|
--
|
||||||
-- ## 1 Prerequisites
|
-- ## 1 Prerequisites
|
||||||
--
|
--
|
||||||
@ -225,6 +233,27 @@ do
|
|||||||
-- -- And start
|
-- -- And start
|
||||||
-- testawacs:__Start(5)
|
-- testawacs:__Start(5)
|
||||||
--
|
--
|
||||||
|
-- ### 5.1 Alternative - Set up as GCI (no AWACS plane needed) Theater Air Control System (TACS)
|
||||||
|
--
|
||||||
|
-- -- Set up as TACS called "GCI Senaki". It will use the AwacsAW AirWing set up above and be of the "blue" coalition. Homebase is Senaki.
|
||||||
|
-- -- No need to set the AWACS Orbit Zone; the FEZ is still a Polygon-Zone called "Rock" we have also
|
||||||
|
-- -- set up in the mission editor with a late activated helo named "Rock#ZONE_POLYGON". Note this also sets the BullsEye to be referenced as "Rock".
|
||||||
|
-- -- The CAP station zone is called "Fremont". We will be on 255 AM. Note the Orbit Zone is given as *nil* in the `New()`-Statement
|
||||||
|
-- local testawacs = AWACS:New("GCI Senaki",AwacsAW,"blue",AIRBASE.Caucasus.Senaki_Kolkhi,nil,ZONE:FindByName("Rock"),"Fremont",255,radio.modulation.AM )
|
||||||
|
-- -- Set up SRS on port 5010 - change the below to your path and port
|
||||||
|
-- testawacs:SetSRS("C:\\Program Files\\DCS-SimpleRadio-Standalone","female","en-GB",5010)
|
||||||
|
-- -- Add a "red" border we don't want to cross, set up in the mission editor with a late activated helo named "Red Border#ZONE_POLYGON"
|
||||||
|
-- testawacs:SetRejectionZone(ZONE:FindByName("Red Border"))
|
||||||
|
-- -- Our CAP flight will have the callsign "Ford", we want 4 AI planes, Time-On-Station is four hours, doing 300 kn IAS.
|
||||||
|
-- testawacs:SetAICAPDetails(CALLSIGN.Aircraft.Ford,4,4,300)
|
||||||
|
-- -- We're modern (default), e.g. we have EPLRS and get more fill-in information on detections
|
||||||
|
-- testawacs:SetModernEra()
|
||||||
|
-- -- Give it a fancy callsign
|
||||||
|
-- testawacs:SetAwacsDetails(CALLSIGN.AWACS.Wizard)
|
||||||
|
-- -- And start as GCI using a group name "Blue EWR" as main EWR station
|
||||||
|
-- testawacs:SetAsGCI(GROUP:FindByName("Blue EWR"),2)
|
||||||
|
-- testawacs:__Start(4)
|
||||||
|
--
|
||||||
-- ## 6 Menu entries
|
-- ## 6 Menu entries
|
||||||
--
|
--
|
||||||
-- **Note on Radio Menu entries**: Due to a DCS limitation, these are on GROUP level and not individual (UNIT level). Hence, either put each player in his/her own group,
|
-- **Note on Radio Menu entries**: Due to a DCS limitation, these are on GROUP level and not individual (UNIT level). Hence, either put each player in his/her own group,
|
||||||
@ -294,7 +323,7 @@ do
|
|||||||
-- * @{#AWACS.SetRejectionZone}() : Add one foreign border. Targets beyond will be ignored for tasking.
|
-- * @{#AWACS.SetRejectionZone}() : Add one foreign border. Targets beyond will be ignored for tasking.
|
||||||
-- * @{#AWACS.DrawFEZ}() : Show the FEZ on the F10 map.
|
-- * @{#AWACS.DrawFEZ}() : Show the FEZ on the F10 map.
|
||||||
-- * @{#AWACS.SetAWACSDetails}() : Set AWACS details.
|
-- * @{#AWACS.SetAWACSDetails}() : Set AWACS details.
|
||||||
-- * @{#AWACS.AddGroupToDetection}() : Add a group object to INTEL detection, e.g. EWR.
|
-- * @{#AWACS.AddGroupToDetection}() : Add a GROUP or SET_GROUP object to INTEL detection, e.g. EWR.
|
||||||
-- * @{#AWACS.SetSRS}() : Set SRS details.
|
-- * @{#AWACS.SetSRS}() : Set SRS details.
|
||||||
-- * @{#AWACS.SetSRSVoiceCAP}() : Set voice details for AI CAP planes, using Windows dektop TTS.
|
-- * @{#AWACS.SetSRSVoiceCAP}() : Set voice details for AI CAP planes, using Windows dektop TTS.
|
||||||
-- * @{#AWACS.SetAICAPDetails}() : Set AI CAP details.
|
-- * @{#AWACS.SetAICAPDetails}() : Set AI CAP details.
|
||||||
@ -364,7 +393,7 @@ do
|
|||||||
-- @field #AWACS
|
-- @field #AWACS
|
||||||
AWACS = {
|
AWACS = {
|
||||||
ClassName = "AWACS", -- #string
|
ClassName = "AWACS", -- #string
|
||||||
version = "beta 0.1.30", -- #string
|
version = "beta 0.2.3231", -- #string
|
||||||
lid = "", -- #string
|
lid = "", -- #string
|
||||||
coalition = coalition.side.BLUE, -- #number
|
coalition = coalition.side.BLUE, -- #number
|
||||||
coalitiontxt = "blue", -- #string
|
coalitiontxt = "blue", -- #string
|
||||||
@ -446,6 +475,8 @@ AWACS = {
|
|||||||
PlayerCapAssigment = true,
|
PlayerCapAssigment = true,
|
||||||
AllowMarkers = false,
|
AllowMarkers = false,
|
||||||
PlayerStationName = nil,
|
PlayerStationName = nil,
|
||||||
|
GCI = false,
|
||||||
|
GCIGroup = nil,
|
||||||
}
|
}
|
||||||
|
|
||||||
---
|
---
|
||||||
@ -706,7 +737,7 @@ AWACS.TaskStatus = {
|
|||||||
--@field #boolean FromAI
|
--@field #boolean FromAI
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
-- TODO-List 0.1.30
|
-- TODO-List 0.2.32
|
||||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
--
|
--
|
||||||
-- DONE - WIP - Player tasking, VID
|
-- DONE - WIP - Player tasking, VID
|
||||||
@ -823,7 +854,9 @@ function AWACS:New(Name,AirWing,Coalition,AirbaseName,AwacsOrbit,OpsZone,Station
|
|||||||
self.Modulation = Modulation or radio.modulation.AM
|
self.Modulation = Modulation or radio.modulation.AM
|
||||||
self.Airbase = AIRBASE:FindByName(AirbaseName)
|
self.Airbase = AIRBASE:FindByName(AirbaseName)
|
||||||
self.AwacsAngels = 25 -- orbit at 25'000 ft
|
self.AwacsAngels = 25 -- orbit at 25'000 ft
|
||||||
self.OrbitZone = ZONE:New(AwacsOrbit) -- Core.Zone#ZONE
|
if AwacsOrbit then
|
||||||
|
self.OrbitZone = ZONE:New(AwacsOrbit) -- Core.Zone#ZONE
|
||||||
|
end
|
||||||
self.BorderZone = nil
|
self.BorderZone = nil
|
||||||
self.CallSign = CALLSIGN.AWACS.Darkstar -- #number
|
self.CallSign = CALLSIGN.AWACS.Darkstar -- #number
|
||||||
self.CallSignNo = 1 -- #number
|
self.CallSignNo = 1 -- #number
|
||||||
@ -1130,6 +1163,24 @@ end
|
|||||||
-- Functions
|
-- Functions
|
||||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
--- [User] Set this instance to act as GCI TACS Theater Air Control System
|
||||||
|
-- @param #AWACS self
|
||||||
|
-- @param Wrapper.Group#GROUP EWR The **main** Early Warning Radar (EWR) GROUP object for GCI.
|
||||||
|
-- @param #number Delay (option) Start after this many seconds (optional).
|
||||||
|
-- @return #AWACS self
|
||||||
|
function AWACS:SetAsGCI(EWR,Delay)
|
||||||
|
self:T(self.lid.."SetGCI")
|
||||||
|
local delay = Delay or -5
|
||||||
|
if type(EWR) == "string" then
|
||||||
|
self.GCIGroup = GROUP:FindByName(EWR)
|
||||||
|
else
|
||||||
|
self.GCIGroup = EWR
|
||||||
|
end
|
||||||
|
self.GCI = true
|
||||||
|
self:SetEscort(0)
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
--- [Internal] Create a AIC-TTS message entry
|
--- [Internal] Create a AIC-TTS message entry
|
||||||
-- @param #AWACS self
|
-- @param #AWACS self
|
||||||
-- @param #string TextTTS Text to speak
|
-- @param #string TextTTS Text to speak
|
||||||
@ -2121,16 +2172,18 @@ function AWACS:_TargetSelectionProcess(Untargeted)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- Bucket 1 - close to AIC (HVT) ca ~45nm
|
-- Bucket 1 - close to AIC (HVT) ca ~45nm
|
||||||
local HVTCoordinate = self.OrbitZone:GetCoordinate()
|
if not self.GCI then
|
||||||
local distance = UTILS.NMToMeters(200)
|
local HVTCoordinate = self.OrbitZone:GetCoordinate()
|
||||||
if contactcoord then
|
local distance = UTILS.NMToMeters(200)
|
||||||
distance = HVTCoordinate:Get2DDistance(contactcoord)
|
if contactcoord then
|
||||||
end
|
distance = HVTCoordinate:Get2DDistance(contactcoord)
|
||||||
self:T(self.lid.."HVT Distance = "..UTILS.Round(UTILS.MetersToNM(distance),0))
|
end
|
||||||
if UTILS.MetersToNM(distance) <= 45 and not checked then
|
self:T(self.lid.."HVT Distance = "..UTILS.Round(UTILS.MetersToNM(distance),0))
|
||||||
self:T(self.lid.."In HVT Distance = YES")
|
if UTILS.MetersToNM(distance) <= 45 and not checked then
|
||||||
targettable:Push(contact,distance)
|
self:T(self.lid.."In HVT Distance = YES")
|
||||||
checked = true
|
targettable:Push(contact,distance)
|
||||||
|
checked = true
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Bucket 2 - in AO/FEZ
|
-- Bucket 2 - in AO/FEZ
|
||||||
@ -2425,7 +2478,7 @@ function AWACS:_Picture(Group,IsGeneral)
|
|||||||
|
|
||||||
if self.OpsZone:IsVec2InZone(coordVec2) then
|
if self.OpsZone:IsVec2InZone(coordVec2) then
|
||||||
self.PictureAO:Push(contact)
|
self.PictureAO:Push(contact)
|
||||||
elseif self.OrbitZone:IsVec2InZone(coordVec2) then
|
elseif self.OrbitZone and self.OrbitZone:IsVec2InZone(coordVec2) then
|
||||||
self.PictureAO:Push(contact)
|
self.PictureAO:Push(contact)
|
||||||
elseif self.ControlZone:IsVec2InZone(coordVec2) then
|
elseif self.ControlZone:IsVec2InZone(coordVec2) then
|
||||||
local distance = math.floor((contact.Contact.position:Get2DDistance(self.ControlZone:GetCoordinate()) / 1000) + 1) -- km
|
local distance = math.floor((contact.Contact.position:Get2DDistance(self.ControlZone:GetCoordinate()) / 1000) + 1) -- km
|
||||||
@ -2533,9 +2586,11 @@ function AWACS:_BogeyDope(Group)
|
|||||||
elseif self.BorderZone and self.BorderZone:IsVec2InZone(coordVec2) then
|
elseif self.BorderZone and self.BorderZone:IsVec2InZone(coordVec2) then
|
||||||
self.ContactsAO:Push(managedcontact,dist)
|
self.ContactsAO:Push(managedcontact,dist)
|
||||||
else
|
else
|
||||||
local distance = contactposition:Get2DDistance(self.OrbitZone:GetCoordinate())
|
if self.OrbitZone then
|
||||||
if (distance <= UTILS.NMToMeters(45)) then
|
local distance = contactposition:Get2DDistance(self.OrbitZone:GetCoordinate())
|
||||||
self.ContactsAO:Push(managedcontact,distance)
|
if (distance <= UTILS.NMToMeters(45)) then
|
||||||
|
self.ContactsAO:Push(managedcontact,distance)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -3603,16 +3658,17 @@ function AWACS:_StartIntel(awacs)
|
|||||||
self.DetectionSet:AddGroup(awacs)
|
self.DetectionSet:AddGroup(awacs)
|
||||||
|
|
||||||
local intel = INTEL:New(self.DetectionSet,self.coalition,self.callsigntxt)
|
local intel = INTEL:New(self.DetectionSet,self.coalition,self.callsigntxt)
|
||||||
--intel:SetVerbosity(2)
|
|
||||||
--intel:SetClusterRadius(UTILS.NMToMeters(5))
|
|
||||||
intel:SetClusterAnalysis(true,false,false)
|
intel:SetClusterAnalysis(true,false,false)
|
||||||
|
|
||||||
local acceptzoneset = SET_ZONE:New()
|
local acceptzoneset = SET_ZONE:New()
|
||||||
acceptzoneset:AddZone(self.ControlZone)
|
acceptzoneset:AddZone(self.ControlZone)
|
||||||
acceptzoneset:AddZone(self.OpsZone)
|
acceptzoneset:AddZone(self.OpsZone)
|
||||||
|
|
||||||
self.OrbitZone:SetRadius(UTILS.NMToMeters(55))
|
if not self.GCI then
|
||||||
acceptzoneset:AddZone(self.OrbitZone)
|
self.OrbitZone:SetRadius(UTILS.NMToMeters(55))
|
||||||
|
acceptzoneset:AddZone(self.OrbitZone)
|
||||||
|
end
|
||||||
|
|
||||||
if self.BorderZone then
|
if self.BorderZone then
|
||||||
acceptzoneset:AddZone(self.BorderZone)
|
acceptzoneset:AddZone(self.BorderZone)
|
||||||
@ -4671,13 +4727,13 @@ function AWACS:_CleanUpAIMissionStack()
|
|||||||
-- looking for missions of type CAP and ALERT5
|
-- looking for missions of type CAP and ALERT5
|
||||||
local mission = _mission -- Ops.Auftrag#AUFTRAG
|
local mission = _mission -- Ops.Auftrag#AUFTRAG
|
||||||
local type = mission:GetType()
|
local type = mission:GetType()
|
||||||
if type == AUFTRAG.Type.ALERT5 then
|
if type == AUFTRAG.Type.ALERT5 and mission:IsNotOver() then
|
||||||
MissionStack:Push(mission,mission.auftragsnummer)
|
MissionStack:Push(mission,mission.auftragsnummer)
|
||||||
Alert5Missions = Alert5Missions + 1
|
Alert5Missions = Alert5Missions + 1
|
||||||
elseif type == AUFTRAG.Type.CAP then
|
elseif type == AUFTRAG.Type.CAP and mission:IsNotOver() then
|
||||||
MissionStack:Push(mission,mission.auftragsnummer)
|
MissionStack:Push(mission,mission.auftragsnummer)
|
||||||
CAPMissions = CAPMissions + 1
|
CAPMissions = CAPMissions + 1
|
||||||
elseif type == AUFTRAG.Type.INTERCEPT then
|
elseif type == AUFTRAG.Type.INTERCEPT and mission:IsNotOver() then
|
||||||
MissionStack:Push(mission,mission.auftragsnummer)
|
MissionStack:Push(mission,mission.auftragsnummer)
|
||||||
InterceptMissions = InterceptMissions + 1
|
InterceptMissions = InterceptMissions + 1
|
||||||
end
|
end
|
||||||
@ -4761,32 +4817,14 @@ function AWACS:_CheckAICAPOnStation()
|
|||||||
self:_ConsistencyCheck()
|
self:_ConsistencyCheck()
|
||||||
|
|
||||||
local capmissions, alert5missions, interceptmissions = self:_CleanUpAIMissionStack()
|
local capmissions, alert5missions, interceptmissions = self:_CleanUpAIMissionStack()
|
||||||
self:T({capmissions, alert5missions, interceptmissions})
|
self:I("CAP="..capmissions.." ALERT5="..alert5missions.." Requested="..self.AIRequested)
|
||||||
|
|
||||||
if self.MaxAIonCAP > 0 then
|
if self.MaxAIonCAP > 0 then
|
||||||
--local onstation = self.AICAPMissions:Count()
|
|
||||||
local onstation = capmissions + alert5missions
|
|
||||||
-- control number of AI CAP Flights
|
|
||||||
if self.AIRequested < self.MaxAIonCAP then
|
|
||||||
-- not enough
|
|
||||||
local AnchorStackNo,free = self:_GetFreeAnchorStack()
|
|
||||||
if free then
|
|
||||||
-- create Alert5 and assign to ONE of our AWs
|
|
||||||
-- TODO better selection due to resource shortage?
|
|
||||||
local mission = AUFTRAG:NewALERT5(AUFTRAG.Type.CAP)
|
|
||||||
self.CatchAllMissions[#self.CatchAllMissions+1] = mission
|
|
||||||
local availableAWS = self.CAPAirwings:Count()
|
|
||||||
local AWS = self.CAPAirwings:GetDataTable()
|
|
||||||
-- round robin
|
|
||||||
self.AIRequested = self.AIRequested + 1
|
|
||||||
--print(((i-1) % divideby)+1)
|
|
||||||
local selectedAW = AWS[(((self.AIRequested-1) % availableAWS)+1)]
|
|
||||||
selectedAW:AddMission(mission)
|
|
||||||
self:T("CAP="..capmissions.." ALERT5="..alert5missions.." Requested="..self.AIRequested)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if self.AIRequested > self.MaxAIonCAP then
|
local onstation = capmissions + alert5missions
|
||||||
|
|
||||||
|
--if self.AIRequested > self.MaxAIonCAP then
|
||||||
|
if capmissions > self.MaxAIonCAP then
|
||||||
-- too many, send one home
|
-- too many, send one home
|
||||||
self:T(string.format("*** Onstation %d > MaxAIOnCAP %d",onstation,self.MaxAIonCAP))
|
self:T(string.format("*** Onstation %d > MaxAIOnCAP %d",onstation,self.MaxAIonCAP))
|
||||||
local mission = self.AICAPMissions:Pull() -- Ops.Auftrag#AUFTRAG
|
local mission = self.AICAPMissions:Pull() -- Ops.Auftrag#AUFTRAG
|
||||||
@ -4800,17 +4838,36 @@ function AWACS:_CheckAICAPOnStation()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- control number of AI CAP Flights
|
||||||
|
if capmissions < self.MaxAIonCAP then
|
||||||
|
-- not enough
|
||||||
|
local AnchorStackNo,free = self:_GetFreeAnchorStack()
|
||||||
|
if free then
|
||||||
|
-- create Alert5 and assign to ONE of our AWs
|
||||||
|
-- TODO better selection due to resource shortage?
|
||||||
|
local mission = AUFTRAG:NewALERT5(AUFTRAG.Type.CAP)
|
||||||
|
self.CatchAllMissions[#self.CatchAllMissions+1] = mission
|
||||||
|
local availableAWS = self.CAPAirwings:Count()
|
||||||
|
local AWS = self.CAPAirwings:GetDataTable()
|
||||||
|
-- round robin
|
||||||
|
self.AIRequested = self.AIRequested + 1
|
||||||
|
local selectedAW = AWS[(((self.AIRequested-1) % availableAWS)+1)]
|
||||||
|
selectedAW:AddMission(mission)
|
||||||
|
self:I("CAP="..capmissions.." ALERT5="..alert5missions.." Requested="..self.AIRequested)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- Check CAP Mission states
|
-- Check CAP Mission states
|
||||||
if onstation > 0 then
|
if onstation > 0 and capmissions < self.MaxAIonCAP then
|
||||||
local missions = self.AICAPMissions:GetDataTable()
|
local missions = self.AICAPMissions:GetDataTable()
|
||||||
-- get mission type and state
|
-- get mission type and state
|
||||||
for _,_Mission in pairs(missions) do
|
for _,_Mission in pairs(missions) do
|
||||||
--local mission = self.AICAPMissions:ReadByID(_MissionID) -- Ops.Auftrag#AUFTRAG
|
|
||||||
local mission = _Mission -- Ops.Auftrag#AUFTRAG
|
local mission = _Mission -- Ops.Auftrag#AUFTRAG
|
||||||
self:T("Looking at AuftragsNr " .. mission.auftragsnummer)
|
self:T("Looking at AuftragsNr " .. mission.auftragsnummer)
|
||||||
local type = mission:GetType()
|
local type = mission:GetType()
|
||||||
local state = mission:GetState()
|
local state = mission:GetState()
|
||||||
--if type == AUFTRAG.Type.CAP or type == AUFTRAG.Type.ALERT5 or type == AUFTRAG.Type.ORBIT then
|
|
||||||
if type == AUFTRAG.Type.ALERT5 then
|
if type == AUFTRAG.Type.ALERT5 then
|
||||||
-- parked up for CAP
|
-- parked up for CAP
|
||||||
local OpsGroups = mission:GetOpsGroups()
|
local OpsGroups = mission:GetOpsGroups()
|
||||||
@ -4821,7 +4878,7 @@ function AWACS:_CheckAICAPOnStation()
|
|||||||
self:T("FG Object in state: " .. FGstate)
|
self:T("FG Object in state: " .. FGstate)
|
||||||
end
|
end
|
||||||
-- FG ready?
|
-- FG ready?
|
||||||
-- if OpsGroup and (state == AUFTRAG.Status.STARTED or FGstate == AUFTRAG.Status.EXECUTING or FGstate == AUFTRAG.Status.SCHEDULED) then
|
|
||||||
if OpsGroup and (FGstate == "Parking" or FGstate == "Cruising") then
|
if OpsGroup and (FGstate == "Parking" or FGstate == "Cruising") then
|
||||||
-- has this group checked in already? Avoid double tasking
|
-- has this group checked in already? Avoid double tasking
|
||||||
local GID, CheckedInAlready = self:_GetManagedGrpID(OpsGroup:GetGroup())
|
local GID, CheckedInAlready = self:_GetManagedGrpID(OpsGroup:GetGroup())
|
||||||
@ -4842,9 +4899,6 @@ function AWACS:_CheckAICAPOnStation()
|
|||||||
local missions = self.AICAPMissions:GetDataTable()
|
local missions = self.AICAPMissions:GetDataTable()
|
||||||
local i = 1
|
local i = 1
|
||||||
for _,_Mission in pairs(missions) do
|
for _,_Mission in pairs(missions) do
|
||||||
--for i=1,self.MaxAIonCAP do
|
|
||||||
--local mission = self.AICAPMissions:ReadByID(_MissionID) -- Ops.Auftrag#AUFTRAG
|
|
||||||
--local mission = self.AICAPMissions:ReadByPointer(i) -- Ops.Auftrag#AUFTRAG
|
|
||||||
local mission = _Mission -- Ops.Auftrag#AUFTRAG
|
local mission = _Mission -- Ops.Auftrag#AUFTRAG
|
||||||
if mission then
|
if mission then
|
||||||
i = i + 1
|
i = i + 1
|
||||||
@ -4869,7 +4923,7 @@ function AWACS:_CheckAICAPOnStation()
|
|||||||
report:Add("===============")
|
report:Add("===============")
|
||||||
end
|
end
|
||||||
if self.debug then
|
if self.debug then
|
||||||
--self:T(report:Text())
|
self:I(report:Text())
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -5162,7 +5216,7 @@ function AWACS:_AssignPilotToTarget(Pilots,Targets)
|
|||||||
|
|
||||||
Pilot.FlightGroup:AddMission(intercept)
|
Pilot.FlightGroup:AddMission(intercept)
|
||||||
|
|
||||||
local Angels = Pilot.AnchorStackAngels
|
local Angels = Pilot.AnchorStackAngels or 25
|
||||||
Angels = Angels * 1000
|
Angels = Angels * 1000
|
||||||
local AnchorSpeed = self.CapSpeedBase or 270
|
local AnchorSpeed = self.CapSpeedBase or 270
|
||||||
AnchorSpeed = UTILS.KnotsToAltKIAS(AnchorSpeed,Angels)
|
AnchorSpeed = UTILS.KnotsToAltKIAS(AnchorSpeed,Angels)
|
||||||
@ -5252,34 +5306,70 @@ function AWACS:onafterStart(From, Event, To)
|
|||||||
MARKER:New(self.AOCoordinate,Rocktag):ToAll()
|
MARKER:New(self.AOCoordinate,Rocktag):ToAll()
|
||||||
self.StationZone:DrawZone(-1,{0,0,1},1,{0,0,1},0.2,5,true)
|
self.StationZone:DrawZone(-1,{0,0,1},1,{0,0,1},0.2,5,true)
|
||||||
local stationtag = string.format("Station: %s\nCoordinate: %s",self.StationZoneName,self.StationZone:GetCoordinate():ToStringLLDDM())
|
local stationtag = string.format("Station: %s\nCoordinate: %s",self.StationZoneName,self.StationZone:GetCoordinate():ToStringLLDDM())
|
||||||
MARKER:New(self.StationZone:GetCoordinate(),stationtag):ToAll()
|
if not self.GCI then
|
||||||
self.OrbitZone:DrawZone(-1,{0,1,0},1,{0,1,0},0.2,5,true)
|
MARKER:New(self.StationZone:GetCoordinate(),stationtag):ToAll()
|
||||||
MARKER:New(self.OrbitZone:GetCoordinate(),"AIC Orbit Zone"):ToAll()
|
self.OrbitZone:DrawZone(-1,{0,1,0},1,{0,1,0},0.2,5,true)
|
||||||
|
MARKER:New(self.OrbitZone:GetCoordinate(),"AIC Orbit Zone"):ToAll()
|
||||||
|
end
|
||||||
else
|
else
|
||||||
local AOCoordString = self.AOCoordinate:ToStringLLDDM()
|
local AOCoordString = self.AOCoordinate:ToStringLLDDM()
|
||||||
local Rocktag = string.format("FEZ: %s\nBulls Coordinate: %s",self.AOName,AOCoordString)
|
local Rocktag = string.format("FEZ: %s\nBulls Coordinate: %s",self.AOName,AOCoordString)
|
||||||
MARKER:New(self.AOCoordinate,Rocktag):ToAll()
|
MARKER:New(self.AOCoordinate,Rocktag):ToAll()
|
||||||
MARKER:New(self.OrbitZone:GetCoordinate(),"AIC Orbit Zone"):ToAll()
|
if not self.GCI then
|
||||||
|
MARKER:New(self.OrbitZone:GetCoordinate(),"AIC Orbit Zone"):ToAll()
|
||||||
|
end
|
||||||
local stationtag = string.format("Station: %s\nCoordinate: %s",self.StationZoneName,self.StationZone:GetCoordinate():ToStringLLDDM())
|
local stationtag = string.format("Station: %s\nCoordinate: %s",self.StationZoneName,self.StationZone:GetCoordinate():ToStringLLDDM())
|
||||||
MARKER:New(self.StationZone:GetCoordinate(),stationtag):ToAll()
|
MARKER:New(self.StationZone:GetCoordinate(),stationtag):ToAll()
|
||||||
end
|
end
|
||||||
|
|
||||||
-- set up the AWACS and let it orbit
|
if not self.GCI then
|
||||||
local AwacsAW = self.AirWing -- Ops.AirWing#AIRWING
|
-- set up the AWACS and let it orbit
|
||||||
local mission = AUFTRAG:NewORBIT_RACETRACK(self.OrbitZone:GetCoordinate(),self.AwacsAngels*1000,self.Speed,self.Heading,self.Leg)
|
local AwacsAW = self.AirWing -- Ops.AirWing#AIRWING
|
||||||
local timeonstation = (self.AwacsTimeOnStation + self.ShiftChangeTime) * 3600
|
local mission = AUFTRAG:NewORBIT_RACETRACK(self.OrbitZone:GetCoordinate(),self.AwacsAngels*1000,self.Speed,self.Heading,self.Leg)
|
||||||
mission:SetTime(nil,timeonstation)
|
local timeonstation = (self.AwacsTimeOnStation + self.ShiftChangeTime) * 3600
|
||||||
self.CatchAllMissions[#self.CatchAllMissions+1] = mission
|
mission:SetTime(nil,timeonstation)
|
||||||
|
self.CatchAllMissions[#self.CatchAllMissions+1] = mission
|
||||||
|
|
||||||
AwacsAW:AddMission(mission)
|
AwacsAW:AddMission(mission)
|
||||||
|
|
||||||
self.AwacsMission = mission
|
self.AwacsMission = mission
|
||||||
self.AwacsInZone = false -- not yet arrived or gone again
|
self.AwacsInZone = false -- not yet arrived or gone again
|
||||||
self.AwacsReady = false
|
self.AwacsReady = false
|
||||||
|
else
|
||||||
|
self.AwacsInZone = true -- for GCI - arrived
|
||||||
|
self.AwacsReady = true
|
||||||
|
self:_StartIntel(self.GCIGroup)
|
||||||
|
|
||||||
|
if self.GCIGroup:IsGround() then
|
||||||
|
self.AwacsFG = ARMYGROUP:New(self.GCIGroup)
|
||||||
|
self.AwacsFG:SetDefaultRadio(self.Frequency,self.Modulation)
|
||||||
|
self.AwacsFG:SwitchRadio(self.Frequency,self.Modulation)
|
||||||
|
elseif self.GCIGroup:IsShip() then
|
||||||
|
self.AwacsFG = NAVYGROUP:New(self.GCIGroup)
|
||||||
|
self.AwacsFG:SetDefaultRadio(self.Frequency,self.Modulation)
|
||||||
|
self.AwacsFG:SwitchRadio(self.Frequency,self.Modulation)
|
||||||
|
else
|
||||||
|
self:E(self.lid.."**** Group unsuitable for GCI ops! Needs to be a GROUND or SHIP type group!")
|
||||||
|
self:Stop()
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
self.AwacsFG:SetSRS(self.PathToSRS,self.Gender,self.Culture,self.Voice,self.Port,self.PathToGoogleKey,"AWACS",self.Volume)
|
||||||
|
self.callsigntxt = string.format("%s",AWACS.CallSignClear[self.CallSign])
|
||||||
|
self:__CheckRadioQueue(-10)
|
||||||
|
|
||||||
|
local text = string.format("%s. All stations, SUNRISE SUNRISE SUNRISE, %s.",self.callsigntxt,self.callsigntxt)
|
||||||
|
self:_NewRadioEntry(text,text,0,false,false,false,false,true)
|
||||||
|
self:T(self.lid..text)
|
||||||
|
self.sunrisedone = true
|
||||||
|
end
|
||||||
|
|
||||||
local ZoneSet = SET_ZONE:New()
|
local ZoneSet = SET_ZONE:New()
|
||||||
ZoneSet:AddZone(self.ControlZone)
|
ZoneSet:AddZone(self.ControlZone)
|
||||||
ZoneSet:AddZone(self.OrbitZone)
|
|
||||||
|
if not self.GCI then
|
||||||
|
ZoneSet:AddZone(self.OrbitZone)
|
||||||
|
end
|
||||||
|
|
||||||
if self.BorderZone then
|
if self.BorderZone then
|
||||||
ZoneSet:AddZone(self.BorderZone)
|
ZoneSet:AddZone(self.BorderZone)
|
||||||
@ -5342,6 +5432,11 @@ function AWACS:onafterStart(From, Event, To)
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if self.GCI then
|
||||||
|
-- set FSM to started
|
||||||
|
self:__Started(-5)
|
||||||
|
end
|
||||||
|
|
||||||
self:__Status(-30)
|
self:__Status(-30)
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
@ -5356,19 +5451,20 @@ function AWACS:_CheckAwacsStatus()
|
|||||||
|
|
||||||
local monitoringdata = self.MonitoringData -- #AWACS.MonitoringData
|
local monitoringdata = self.MonitoringData -- #AWACS.MonitoringData
|
||||||
|
|
||||||
if awacs and awacs:IsAlive() and not self.AwacsInZone then
|
if not self.GCI then
|
||||||
-- check if we arrived
|
if awacs and awacs:IsAlive() and not self.AwacsInZone then
|
||||||
local orbitzone = self.OrbitZone -- Core.Zone#ZONE
|
-- check if we arrived
|
||||||
if awacs:IsInZone(orbitzone) then
|
local orbitzone = self.OrbitZone -- Core.Zone#ZONE
|
||||||
-- arrived
|
if awacs:IsInZone(orbitzone) then
|
||||||
self.AwacsInZone = true
|
-- arrived
|
||||||
self:T(self.lid.."Arrived in Orbit Zone: " .. orbitzone:GetName())
|
self.AwacsInZone = true
|
||||||
local text = string.format("%s on station for %s control.",self.callsigntxt,self.AOName or "Rock")
|
self:T(self.lid.."Arrived in Orbit Zone: " .. orbitzone:GetName())
|
||||||
local textScreen = string.format("%s on station for %s control.",self.callsigntxt,self.AOName or "Rock")
|
local text = string.format("%s on station for %s control.",self.callsigntxt,self.AOName or "Rock")
|
||||||
self:_NewRadioEntry(text,textScreen,0,false,true,true,false,true)
|
local textScreen = string.format("%s on station for %s control.",self.callsigntxt,self.AOName or "Rock")
|
||||||
|
self:_NewRadioEntry(text,textScreen,0,false,true,true,false,true)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- AWACS
|
-- AWACS
|
||||||
--------------------------------
|
--------------------------------
|
||||||
@ -5393,6 +5489,7 @@ function AWACS:_CheckAwacsStatus()
|
|||||||
self.sunrisedone = true
|
self.sunrisedone = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Check on Awacs Mission Status
|
-- Check on Awacs Mission Status
|
||||||
local AWmission = self.AwacsMission -- Ops.Auftrag#AUFTRAG
|
local AWmission = self.AwacsMission -- Ops.Auftrag#AUFTRAG
|
||||||
local awstatus = AWmission:GetState()
|
local awstatus = AWmission:GetState()
|
||||||
@ -5592,7 +5689,11 @@ function AWACS:onafterStatus(From, Event, To)
|
|||||||
|
|
||||||
self:_SetClientMenus()
|
self:_SetClientMenus()
|
||||||
|
|
||||||
local monitoringdata = self:_CheckAwacsStatus()
|
local monitoringdata = self.MonitoringData -- #AWACS.MonitoringData
|
||||||
|
|
||||||
|
if not self.GCI then
|
||||||
|
monitoringdata = self:_CheckAwacsStatus()
|
||||||
|
end
|
||||||
|
|
||||||
local awacsalive = false
|
local awacsalive = false
|
||||||
if self.AwacsFG then
|
if self.AwacsFG then
|
||||||
@ -5614,6 +5715,7 @@ function AWACS:onafterStatus(From, Event, To)
|
|||||||
if self.debug then
|
if self.debug then
|
||||||
--local outcome, targets = self:_TargetSelectionProcess() -- TODO for debug ATM
|
--local outcome, targets = self:_TargetSelectionProcess() -- TODO for debug ATM
|
||||||
end
|
end
|
||||||
|
|
||||||
local outcome, targets = self:_TargetSelectionProcess(true)
|
local outcome, targets = self:_TargetSelectionProcess(true)
|
||||||
|
|
||||||
self:_CheckTaskQueue()
|
self:_CheckTaskQueue()
|
||||||
@ -5631,14 +5733,17 @@ function AWACS:onafterStatus(From, Event, To)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
monitoringdata.AwacsShiftChange = self.ShiftChangeAwacsFlag
|
if not self.GCI then
|
||||||
|
monitoringdata.AwacsShiftChange = self.ShiftChangeAwacsFlag
|
||||||
|
|
||||||
if self.AwacsFG then
|
if self.AwacsFG then
|
||||||
monitoringdata.AwacsStateFG = self.AwacsFG:GetState()
|
monitoringdata.AwacsStateFG = self.AwacsFG:GetState()
|
||||||
|
end
|
||||||
|
|
||||||
|
monitoringdata.AwacsStateMission = self.AwacsMission:GetState()
|
||||||
|
monitoringdata.EscortsShiftChange = self.ShiftChangeEscortsFlag
|
||||||
end
|
end
|
||||||
|
|
||||||
monitoringdata.AwacsStateMission = self.AwacsMission:GetState()
|
|
||||||
monitoringdata.EscortsShiftChange = self.ShiftChangeEscortsFlag
|
|
||||||
monitoringdata.AICAPCurrent = self.AICAPMissions:Count()
|
monitoringdata.AICAPCurrent = self.AICAPMissions:Count()
|
||||||
monitoringdata.AICAPMax = self.MaxAIonCAP
|
monitoringdata.AICAPMax = self.MaxAIonCAP
|
||||||
monitoringdata.Airwings = self.CAPAirwings:Count()
|
monitoringdata.Airwings = self.CAPAirwings:Count()
|
||||||
@ -5780,9 +5885,12 @@ function AWACS:onafterAssignedAnchor(From, Event, To, GID, Anchor, AnchorStackNo
|
|||||||
-- all correct
|
-- all correct
|
||||||
local capauftrag = AUFTRAG:NewCAP(Anchor.StationZone,Angels*1000,AnchorSpeed,Anchor.StationZone:GetCoordinate(),0,15,{})
|
local capauftrag = AUFTRAG:NewCAP(Anchor.StationZone,Angels*1000,AnchorSpeed,Anchor.StationZone:GetCoordinate(),0,15,{})
|
||||||
capauftrag:SetTime(nil,((self.CAPTimeOnStation*3600)+(15*60)))
|
capauftrag:SetTime(nil,((self.CAPTimeOnStation*3600)+(15*60)))
|
||||||
|
capauftrag:AddAsset(managedgroup.FlightGroup)
|
||||||
self.CatchAllMissions[#self.CatchAllMissions+1] = capauftrag
|
self.CatchAllMissions[#self.CatchAllMissions+1] = capauftrag
|
||||||
|
--local AirWing = managedgroup.FlightGroup:GetAirWing()
|
||||||
managedgroup.FlightGroup:AddMission(capauftrag)
|
managedgroup.FlightGroup:AddMission(capauftrag)
|
||||||
auftrag:Cancel()
|
auftrag:Cancel()
|
||||||
|
--AirWing:AddMission(capauftrag)
|
||||||
else
|
else
|
||||||
self:E("**** AssignedAnchor but Auftrag NOT ALERT5!")
|
self:E("**** AssignedAnchor but Auftrag NOT ALERT5!")
|
||||||
end
|
end
|
||||||
@ -5863,8 +5971,13 @@ function AWACS:onafterNewCluster(From,Event,To,Cluster)
|
|||||||
-- only announce if in right distance to HVT/AIC or in ControlZone or in BorderZone
|
-- only announce if in right distance to HVT/AIC or in ControlZone or in BorderZone
|
||||||
local ContactCoordinate = Contact.position:GetVec2()
|
local ContactCoordinate = Contact.position:GetVec2()
|
||||||
local incontrolzone = self.ControlZone:IsVec2InZone(ContactCoordinate)
|
local incontrolzone = self.ControlZone:IsVec2InZone(ContactCoordinate)
|
||||||
|
|
||||||
-- distance check to HVT
|
-- distance check to HVT
|
||||||
local distance = Contact.position:Get2DDistance(self.OrbitZone:GetCoordinate())
|
local distance = 1000000
|
||||||
|
if not self.GCI then
|
||||||
|
distance = Contact.position:Get2DDistance(self.OrbitZone:GetCoordinate())
|
||||||
|
end
|
||||||
|
|
||||||
local inborderzone = false
|
local inborderzone = false
|
||||||
if self.BorderZone then
|
if self.BorderZone then
|
||||||
inborderzone = self.BorderZone:IsVec2InZone(ContactCoordinate)
|
inborderzone = self.BorderZone:IsVec2InZone(ContactCoordinate)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user