mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-08-23 02:08:17 +00:00
xx
This commit is contained in:
@@ -175,7 +175,7 @@ function SCHEDULEDISPATCHER:AddSchedule( Scheduler, ScheduleFunction, ScheduleAr
|
|||||||
local Name = Info.name or "?"
|
local Name = Info.name or "?"
|
||||||
|
|
||||||
local ErrorHandler = function( errmsg )
|
local ErrorHandler = function( errmsg )
|
||||||
env.info( "Error in timer function: " .. errmsg )
|
env.info( "Error in timer function: " .. errmsg or "" )
|
||||||
if BASE.Debug ~= nil then
|
if BASE.Debug ~= nil then
|
||||||
env.info( BASE.Debug.traceback() )
|
env.info( BASE.Debug.traceback() )
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -534,6 +534,19 @@ function ZONE_BASE:GetZoneProbability()
|
|||||||
return self.ZoneProbability
|
return self.ZoneProbability
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Get the coordinate on the radius of the zone nearest to Outsidecoordinate. Useto e.g. find an ingress point.
|
||||||
|
-- @param #ZONE_BASE self
|
||||||
|
-- @param Core.Point#COORDINATE Outsidecoordinate The coordinate outside of the zone from where to look.
|
||||||
|
-- @return Core.Point#COORDINATE CoordinateOnRadius
|
||||||
|
function ZONE_BASE:FindNearestCoordinateOnRadius(Outsidecoordinate)
|
||||||
|
local Vec1 = self:GetVec2()
|
||||||
|
local Radius = self:GetRadius()
|
||||||
|
local Vec2 = Outsidecoordinate:GetVec2()
|
||||||
|
local Point = UTILS.FindNearestPointOnCircle(Vec1,Radius,Vec2)
|
||||||
|
local rc = COORDINATE:NewFromVec2(Point)
|
||||||
|
return rc
|
||||||
|
end
|
||||||
|
|
||||||
--- Get the zone taking into account the randomization probability of a zone to be selected.
|
--- Get the zone taking into account the randomization probability of a zone to be selected.
|
||||||
-- @param #ZONE_BASE self
|
-- @param #ZONE_BASE self
|
||||||
-- @return #ZONE_BASE The zone is selected taking into account the randomization probability factor.
|
-- @return #ZONE_BASE The zone is selected taking into account the randomization probability factor.
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ AUTOLASE = {
|
|||||||
debug = false,
|
debug = false,
|
||||||
smokemenu = true,
|
smokemenu = true,
|
||||||
RoundingPrecision = 0,
|
RoundingPrecision = 0,
|
||||||
increasegroundawareness = true,
|
increasegroundawareness = false,
|
||||||
MonitorFrequency = 30,
|
MonitorFrequency = 30,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -216,7 +216,7 @@ function AUTOLASE:New(RecceSet, Coalition, Alias, PilotSet)
|
|||||||
self.smokemenu = true
|
self.smokemenu = true
|
||||||
self.threatmenu = true
|
self.threatmenu = true
|
||||||
self.RoundingPrecision = 0
|
self.RoundingPrecision = 0
|
||||||
self.increasegroundawareness = true
|
self.increasegroundawareness = false
|
||||||
self.MonitorFrequency = 30
|
self.MonitorFrequency = 30
|
||||||
|
|
||||||
self:EnableSmokeMenu({Angle=math.random(0,359),Distance=math.random(10,20)})
|
self:EnableSmokeMenu({Angle=math.random(0,359),Distance=math.random(10,20)})
|
||||||
@@ -1020,7 +1020,7 @@ function AUTOLASE:_Prescient()
|
|||||||
self:T(self.lid.."Checking possibly visible STATICs for Recce "..unit:GetName())
|
self:T(self.lid.."Checking possibly visible STATICs for Recce "..unit:GetName())
|
||||||
for _,_static in pairs(Statics) do -- DCS static object here
|
for _,_static in pairs(Statics) do -- DCS static object here
|
||||||
local static = STATIC:Find(_static)
|
local static = STATIC:Find(_static)
|
||||||
if static and static:GetCoalition() ~= self.coalition then
|
if static and static:GetCoalition() ~= self.coalition and static:GetCoordinate() then
|
||||||
local IsLOS = position:IsLOS(static:GetCoordinate())
|
local IsLOS = position:IsLOS(static:GetCoordinate())
|
||||||
if IsLOS then
|
if IsLOS then
|
||||||
unit:KnowUnit(static,true,true)
|
unit:KnowUnit(static,true,true)
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -4718,3 +4718,4 @@ function UTILS.FindNearestPointOnCircle(Vec1,Radius,Vec2)
|
|||||||
|
|
||||||
return {x=qx, y=qy}
|
return {x=qx, y=qy}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user