mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Ops
This commit is contained in:
@@ -1591,10 +1591,9 @@ function AIRWING:onafterAssetSpawned(From, Event, To, group, asset, request)
|
||||
-- Get the SQUADRON of the asset.
|
||||
local squadron=self:GetSquadronOfAsset(asset)
|
||||
|
||||
-- Set default TACAN channel.
|
||||
-- Get TACAN channel.
|
||||
local Tacan=squadron:FetchTacan()
|
||||
if Tacan then
|
||||
flightgroup:SwitchTACAN(Tacan, Morse, UnitName, Band)
|
||||
asset.tacan=Tacan
|
||||
end
|
||||
|
||||
@@ -1617,14 +1616,27 @@ function AIRWING:onafterAssetSpawned(From, Event, To, group, asset, request)
|
||||
|
||||
-- Add mission to flightgroup queue.
|
||||
if mission then
|
||||
|
||||
if Tacan then
|
||||
mission:SetTACAN(Tacan, Morse, UnitName, Band)
|
||||
end
|
||||
|
||||
-- Add mission to flightgroup queue.
|
||||
asset.flightgroup:AddMission(mission)
|
||||
|
||||
-- Trigger event.
|
||||
self:FlightOnMission(flightgroup, mission)
|
||||
|
||||
else
|
||||
|
||||
if Tacan then
|
||||
flightgroup:SwitchTACAN(Tacan, Morse, UnitName, Band)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
-- Add group to the detection set of the WINGCOMMANDER.
|
||||
if self.wingcommander and self.wingcommander.chief then
|
||||
self.wingcommander.chief.detectionset:AddGroup(asset.flightgroup.group)
|
||||
|
||||
Reference in New Issue
Block a user