- Fixed bug in LaseOnCoordinate.
- Minor stuff.
This commit is contained in:
Frank 2019-06-30 17:34:00 +02:00
parent 2a7b9cf898
commit 376a3553fa
6 changed files with 20 additions and 17 deletions

View File

@ -1617,7 +1617,7 @@ do -- AI_A2A_DISPATCHER
--- Check if the Squadron is visible before startup of the dispatcher.
-- @param #AI_A2A_DISPATCHER self
-- @param #string SquadronName The squadron name.
-- @return #bool true if visible.
-- @return #boolean true if visible.
-- @usage
--
-- -- Set the Squadron visible before startup of dispatcher.
@ -2733,7 +2733,7 @@ do -- AI_A2A_DISPATCHER
end
---
--- Activate resource.
-- @param #AI_A2A_DISPATCHER self
function AI_A2A_DISPATCHER:ResourceActivate( DefenderSquadron, DefendersNeeded )

View File

@ -558,6 +558,10 @@ do -- SET_BASE
--- Iterate the SET_BASE and derived classes and call an iterator function for the given SET_BASE, providing the Object for each element within the set and optional parameters.
-- @param #SET_BASE self
-- @param #function IteratorFunction The function that will be called.
-- @param #table arg Arguments of the IteratorFunction.
-- @param #SET_BASE Set (Optional) The set to use. Default self:GetSet().
-- @param #function Function (Optional) A function returning a #boolean true/false. Only if true, the IteratorFunction is called.
-- @param #table FunctionArguments (Optional) Function arguments.
-- @return #SET_BASE self
function SET_BASE:ForEach( IteratorFunction, arg, Set, Function, FunctionArguments )
self:F3( arg )
@ -571,7 +575,7 @@ do -- SET_BASE
local Object = ObjectData
self:T3( Object )
if Function then
if Function( unpack( FunctionArguments ), Object ) == true then
if Function( unpack( FunctionArguments or {} ), Object ) == true then
IteratorFunction( Object, unpack( arg ) )
end
else

View File

@ -285,11 +285,8 @@ do
local RecceDcsUnit = self.Recce:GetDCSObject()
local aimat=Coordinate
aimat.y=aimat.y+1
self.SpotIR = Spot.createInfraRed( RecceDcsUnit, { x = 0, y = 2, z = 0 }, aimat:GetVec3() )
self.SpotLaser = Spot.createLaser( RecceDcsUnit, { x = 0, y = 2, z = 0 }, aimat:GetVec3(), LaserCode )
self.SpotIR = Spot.createInfraRed( RecceDcsUnit, { x = 0, y = 1, z = 0 }, Coordinate:GetVec3() )
self.SpotLaser = Spot.createLaser( RecceDcsUnit, { x = 0, y = 1, z = 0 }, Coordinate:GetVec3(), LaserCode )
if Duration then
self.ScheduleID = self.LaseScheduler:Schedule( self, StopLase, {self}, Duration )
@ -323,14 +320,14 @@ do
self:__Lasing( -0.2 )
elseif self.TargetCoord then
local aimat=self.TargetCoord --Core.Point#COORDINATE
aimat.y=aimat.y+1+math.random(-100,100)/100
aimat.x=aimat.x+math.random(-100,100)/100
-- Wiggle the IR spot a bit.
local irvec3={x=self.TargetCoord.x+math.random(-100,100)/100, y=self.TargetCoord.y+math.random(-100,100)/100, z=self.TargetCoord.z} --#DCS.Vec3
local lsvec3={x=self.TargetCoord.x, y=self.TargetCoord.y, z=self.TargetCoord.z} --#DCS.Vec3
self.SpotIR:setPoint(aimat:GetVec3())
self.SpotLaser:setPoint(self.TargetCoord:GetVec3())
self.SpotIR:setPoint(irvec3)
self.SpotLaser:setPoint(lsvec3)
self:__Lasing( -0.2 )
self:__Lasing(-0.25)
else
self:F( { "Target is not alive", self.Target:IsAlive() } )
end

View File

@ -1898,7 +1898,7 @@ do -- DETECTION_BASE
--- Get the Detection Set.
-- @param #DETECTION_BASE self
-- @return Core.Set#SET_BASE
-- @return #DETECTION_BASE self
function DETECTION_BASE:GetDetectionSet()
local DetectionSet = self.DetectionSet

View File

@ -4986,7 +4986,7 @@ function WAREHOUSE:onafterAirbaseRecaptured(From, Event, To, Coalition)
end
--- On after "AssetDead" event triggerd when an asset group died.
--- On after "AssetDead" event triggered when an asset group died.
-- @param #WAREHOUSE self
-- @param #string From From state.
-- @param #string Event Event.

View File

@ -12519,7 +12519,7 @@ end
-- @param #number optdist Optimal distance in meters.
-- @return #string Feedback message text.
-- @return #string Debriefing text.
-- @#AIRBOSS.RadioCall Distance radio call. Not implemented yet.
-- @return #AIRBOSS.RadioCall Distance radio call. Not implemented yet.
function AIRBOSS:_DistanceCheck(playerData, optdist)
if optdist==nil then
@ -12554,8 +12554,10 @@ function AIRBOSS:_DistanceCheck(playerData, optdist)
hint=hint..string.format(" Optimal distance is %.1f NM.", UTILS.MetersToNM(optdist))
elseif playerData.difficulty==AIRBOSS.Difficulty.NORMAL then
-- We keep it short normally.
hint=""
elseif playerData.difficulty==AIRBOSS.Difficulty.HARD then
-- No hint at all for the pros.
hint=""
end
-- Debriefing text.