mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
#AWACS
* Remove tactical subscription when client logs out or dies
This commit is contained in:
parent
838e11de05
commit
63a524f25c
@ -507,7 +507,7 @@ do
|
|||||||
-- @field #AWACS
|
-- @field #AWACS
|
||||||
AWACS = {
|
AWACS = {
|
||||||
ClassName = "AWACS", -- #string
|
ClassName = "AWACS", -- #string
|
||||||
version = "0.2.56", -- #string
|
version = "0.2.57", -- #string
|
||||||
lid = "", -- #string
|
lid = "", -- #string
|
||||||
coalition = coalition.side.BLUE, -- #number
|
coalition = coalition.side.BLUE, -- #number
|
||||||
coalitiontxt = "blue", -- #string
|
coalitiontxt = "blue", -- #string
|
||||||
@ -1784,7 +1784,7 @@ function AWACS:_EventHandler(EventData)
|
|||||||
if WeaponDesc.category == 1 then
|
if WeaponDesc.category == 1 then
|
||||||
Type = "Missile"
|
Type = "Missile"
|
||||||
-- AAM
|
-- AAM
|
||||||
local guidance = WeaponDesc.guidance -- IR=2, Radar Active=3, Radar Semi Active=4, Radar Passive = 5
|
local guidance = WeaponDesc.guidance or 4 -- IR=2, Radar Active=3, Radar Semi Active=4, Radar Passive = 5
|
||||||
if guidance == 2 then
|
if guidance == 2 then
|
||||||
warndist = 10
|
warndist = 10
|
||||||
elseif guidance == 3 then
|
elseif guidance == 3 then
|
||||||
@ -3695,11 +3695,17 @@ function AWACS:_CheckOut(Group,GID,dead)
|
|||||||
local managedgroup = self.ManagedGrps[GID] -- #AWACS.ManagedGroup
|
local managedgroup = self.ManagedGrps[GID] -- #AWACS.ManagedGroup
|
||||||
local Stack = managedgroup.AnchorStackNo
|
local Stack = managedgroup.AnchorStackNo
|
||||||
local Angels = managedgroup.AnchorStackAngels
|
local Angels = managedgroup.AnchorStackAngels
|
||||||
|
local GroupName = managedgroup.GroupName
|
||||||
-- remove menus
|
-- remove menus
|
||||||
if managedgroup.IsPlayer then
|
if managedgroup.IsPlayer then
|
||||||
if self.clientmenus:HasUniqueID(managedgroup.GroupName) then
|
if self.clientmenus:HasUniqueID(GroupName) then
|
||||||
local menus = self.clientmenus:PullByID(managedgroup.GroupName) --#AWACS.MenuStructure
|
local menus = self.clientmenus:PullByID(GroupName) --#AWACS.MenuStructure
|
||||||
menus.basemenu:Remove()
|
menus.basemenu:Remove()
|
||||||
|
if self.TacticalSubscribers[GroupName] then
|
||||||
|
local Freq = self.TacticalSubscribers[GroupName]
|
||||||
|
self.TacticalFrequencies[Freq] = Freq
|
||||||
|
self.TacticalSubscribers[GroupName] = nil
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- delete open tasks
|
-- delete open tasks
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user