Merge branch 'FlightControl-Master:master' into master

This commit is contained in:
Penecruz 2021-10-31 06:59:50 +11:00 committed by GitHub
commit 176d9df476
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 16 deletions

View File

@ -207,7 +207,7 @@ end
do -- MENU_BASE
--- @type MENU_BASE
-- @extends Base#BASE
-- @extends Core.Base#BASE
--- Defines the main MENU class where other MENU classes are derived from.
-- This is an abstract class, so don't use it.

View File

@ -308,17 +308,14 @@ do -- SET_BASE
-- @return Core.Set#SET_BASE The set of objects that are in set *B* but **not** in this set *A*.
function SET_BASE:GetSetComplement(SetB)
local complement=SET_BASE:New()
local complement = self:GetSetUnion(SetB)
local intersection = self:GetSetIntersection(SetB)
local union=self:GetSetUnion(SetA, SetB)
for _,Object in pairs(union.Set) do
if SetA:IsIncludeObject(Object) and SetB:IsIncludeObject(Object) then
intersection:Add(intersection)
end
for _,Object in pairs(intersection.Set) do
complement:Remove(Object.ObjectName,true)
end
return intersection
return complement
end

View File

@ -23,7 +23,6 @@
-- @module Functional.FOX
-- @image Functional_FOX.png
--- FOX class.
-- @type FOX
-- @field #string ClassName Name of the class.
@ -47,8 +46,7 @@
-- @field #number dt10 Time step [sec] for missile position updates if distance to target > 10 km and < 50 km. Default 1 sec.
-- @field #number dt05 Time step [sec] for missile position updates if distance to target > 5 km and < 10 km. Default 0.5 sec.
-- @field #number dt01 Time step [sec] for missile position updates if distance to target > 1 km and < 5 km. Default 0.1 sec.
-- @field #number dt00 Time step [sec] for missile position updates if distance to target < 1 km. Default 0.01 sec.
-- @field #boolean
-- @field #number dt00 Time step [sec] for missile position updates if distance to target < 1 km. Default 0.01 sec.
-- @extends Core.Fsm#FSM
--- Fox 3!
@ -1813,4 +1811,4 @@ end
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

View File

@ -568,12 +568,12 @@ function GROUP:GetSpeedMax()
local Units=self:GetUnits()
local speedmax=nil
local speedmax=0
for _,unit in pairs(Units) do
local unit=unit --Wrapper.Unit#UNIT
local speed=unit:GetSpeedMax()
if speedmax==nil then
if speedmax==0 then
speedmax=speed
elseif speed<speedmax then
speedmax=speed

View File

@ -442,7 +442,7 @@ function UNIT:GetSpeedMax()
return SpeedMax*3.6
end
return nil
return 0
end
--- Returns the unit's max range in meters derived from the DCS descriptors.