mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
FOX Missile Trainer
FOX v0.5.0 - Added new missile trainer. RANGE v2.1.1 - Fixed bugs. WAREHOUSE v0.9.0 - Added events AssetSpawned and AssetLowFuel - Improved Arrived function.
This commit is contained in:
@@ -887,6 +887,14 @@ function AIRBASE:CheckOnRunWay(group, radius, despawn)
|
||||
return false
|
||||
end
|
||||
|
||||
--- Get category of airbase.
|
||||
-- @param #WAREHOUSE self
|
||||
-- @return #number Category of airbase from GetDesc().category.
|
||||
function AIRBASE:GetAirbaseCategory()
|
||||
return self:GetDesc().category
|
||||
end
|
||||
|
||||
|
||||
--- Helper function to check for the correct terminal type including "artificial" ones.
|
||||
-- @param #number Term_Type Termial type from getParking routine.
|
||||
-- @param #AIRBASE.TerminalType termtype Terminal type from AIRBASE.TerminalType enumerator.
|
||||
|
||||
@@ -655,7 +655,7 @@ end
|
||||
|
||||
--- Count number of alive units in the group.
|
||||
-- @param #GROUP self
|
||||
-- @return #number Number of alive units
|
||||
-- @return #number Number of alive units. If DCS group is nil, 0 is returned.
|
||||
function GROUP:CountAliveUnits()
|
||||
self:F3( { self.GroupName } )
|
||||
local DCSGroup = self:GetDCSObject()
|
||||
@@ -672,7 +672,7 @@ function GROUP:CountAliveUnits()
|
||||
return n
|
||||
end
|
||||
|
||||
return nil
|
||||
return 0
|
||||
end
|
||||
|
||||
--- Get the first unit of the group which is alive.
|
||||
|
||||
@@ -655,6 +655,21 @@ function POSITIONABLE:GetVelocityVec3()
|
||||
return nil
|
||||
end
|
||||
|
||||
--- Get relative velocity with respect to another POSITIONABLE.
|
||||
-- @param #POSITIONABLE self
|
||||
-- @param #POSITIONABLE positionable Other positionable.
|
||||
-- @return #number Relative velocity in m/s.
|
||||
function POSITIONABLE:GetRelativeVelocity(positionable)
|
||||
self:F2( self.PositionableName )
|
||||
|
||||
local v1=self:GetVelocityVec3()
|
||||
local v2=positionable:GetVelocityVec3()
|
||||
|
||||
local vtot=UTILS.VecAdd(v1,v2)
|
||||
|
||||
return UTILS.VecNorm(vtot)
|
||||
end
|
||||
|
||||
|
||||
--- Returns the POSITIONABLE height in meters.
|
||||
-- @param Wrapper.Positionable#POSITIONABLE self
|
||||
@@ -1148,9 +1163,9 @@ end
|
||||
|
||||
--- Start Lasing a POSITIONABLE
|
||||
-- @param #POSITIONABLE self
|
||||
-- @param #POSITIONABLE Target
|
||||
-- @param #number LaserCode
|
||||
-- @param #number Duration
|
||||
-- @param #POSITIONABLE Target The target to lase.
|
||||
-- @param #number LaserCode Laser code or random number in [1000, 9999].
|
||||
-- @param #number Duration Duration of lasing in seconds.
|
||||
-- @return Core.Spot#SPOT
|
||||
function POSITIONABLE:LaseUnit( Target, LaserCode, Duration ) --R2.1
|
||||
self:F2()
|
||||
|
||||
Reference in New Issue
Block a user