mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Update RAT.lua
This commit is contained in:
@@ -4349,25 +4349,26 @@ function RAT:_Destroy(group)
|
|||||||
|
|
||||||
if DCSGroup and DCSGroup:isExist() then
|
if DCSGroup and DCSGroup:isExist() then
|
||||||
|
|
||||||
-- Cread one single Dead event and delete units from database.
|
-- -- Cread one single Dead event and delete units from database.
|
||||||
local triggerdead=true
|
-- local triggerdead=true
|
||||||
for _,DCSUnit in pairs(DCSGroup:getUnits()) do
|
-- for _,DCSUnit in pairs(DCSGroup:getUnits()) do
|
||||||
|
--
|
||||||
-- Dead event.
|
-- -- Dead event.
|
||||||
if DCSUnit then
|
-- if DCSUnit then
|
||||||
if triggerdead then
|
-- if triggerdead then
|
||||||
self:_CreateEventDead(timer.getTime(), DCSUnit)
|
-- self:_CreateEventDead(timer.getTime(), DCSUnit)
|
||||||
triggerdead=false
|
-- triggerdead=false
|
||||||
end
|
-- end
|
||||||
|
--
|
||||||
-- Delete from data base.
|
-- -- Delete from data base.
|
||||||
_DATABASE:DeleteUnit(DCSUnit:getName())
|
-- _DATABASE:DeleteUnit(DCSUnit:getName())
|
||||||
end
|
-- end
|
||||||
end
|
-- end
|
||||||
|
|
||||||
local ratcraft=self:_GetRatcraftFromGroup(group)
|
local ratcraft=self:_GetRatcraftFromGroup(group)
|
||||||
|
|
||||||
ratcraft.flightgroup:Destroy(0)
|
ratcraft.flightgroup:Destroy(0)
|
||||||
|
ratcraft.flightgroup:__Stop(0.1)
|
||||||
|
|
||||||
-- Destroy DCS group.
|
-- Destroy DCS group.
|
||||||
--DCSGroup:destroy()
|
--DCSGroup:destroy()
|
||||||
|
|||||||
Reference in New Issue
Block a user