mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Static
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
env.info( '*** MOOSE STATIC INCLUDE START *** ' )
|
env.info( '*** MOOSE STATIC INCLUDE START *** ' )
|
||||||
env.info( 'Moose Generation Timestamp: 20170708_1419' )
|
env.info( 'Moose Generation Timestamp: 20170711_1657' )
|
||||||
|
|
||||||
--- Various routines
|
--- Various routines
|
||||||
-- @module routines
|
-- @module routines
|
||||||
@@ -2674,6 +2674,10 @@ UTILS.KnotsToMps = function(knots)
|
|||||||
return knots*1852/3600
|
return knots*1852/3600
|
||||||
end
|
end
|
||||||
|
|
||||||
|
UTILS.KnotsToKmph = function(knots)
|
||||||
|
return knots* 1.852
|
||||||
|
end
|
||||||
|
|
||||||
UTILS.KmphToMps = function(kmph)
|
UTILS.KmphToMps = function(kmph)
|
||||||
return kmph/3.6
|
return kmph/3.6
|
||||||
end
|
end
|
||||||
@@ -9790,6 +9794,23 @@ function SET_GROUP:FilterStart()
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Handles the OnDead or OnCrash event for alive groups set.
|
||||||
|
-- Note: The GROUP object in the SET_GROUP collection will only be removed if the last unit is destroyed of the GROUP.
|
||||||
|
-- @param #SET_GROUP self
|
||||||
|
-- @param Core.Event#EVENTDATA Event
|
||||||
|
function SET_GROUP:_EventOnDeadOrCrash( Event )
|
||||||
|
self:F3( { Event } )
|
||||||
|
|
||||||
|
if Event.IniDCSUnit then
|
||||||
|
local ObjectName, Object = self:FindInDatabase( Event )
|
||||||
|
if ObjectName then
|
||||||
|
if Event.IniDCSGroup:getSize() == 1 then -- Only remove if the last unit of the group was destroyed.
|
||||||
|
self:Remove( ObjectName )
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
--- Handles the Database to check on an event (birth) that the Object was added in the Database.
|
--- Handles the Database to check on an event (birth) that the Object was added in the Database.
|
||||||
-- This is required, because sometimes the _DATABASE birth event gets called later than the SET_BASE birth event!
|
-- This is required, because sometimes the _DATABASE birth event gets called later than the SET_BASE birth event!
|
||||||
-- @param #SET_GROUP self
|
-- @param #SET_GROUP self
|
||||||
|
|||||||
Reference in New Issue
Block a user