Merge branch 'master-ng' into develop

This commit is contained in:
Thomas
2026-03-24 12:37:14 +01:00
committed by GitHub
11 changed files with 38 additions and 98 deletions
+4 -1
View File
@@ -3143,7 +3143,10 @@ function AIRBOSS:EnableSRS(PathToSRS,Port,Culture,Gender,Voice,GoogleCreds,Volum
self.SRS:SetVoice(Voice)
end
if (not Voice) and self.SRS and self.SRS:GetProvider() == MSRS.Provider.GOOGLE then
self.SRS.voice = MSRS.poptions["gcloud"].voice or MSRS.Voices.Google.Standard.en_US_Standard_B
self.SRS.voice = MSRS.Voices.Google.Standard.en_US_Standard_B
if MSRS.poptions and MSRS.poptions["gcloud"] and MSRS.poptions["gcloud"].voice then
self.SRS.voice = MSRS.poptions["gcloud"].voice
end
end
--self.SRS:SetVolume(Volume or 1.0)
-- SRSQUEUE
+1 -1
View File
@@ -2842,7 +2842,7 @@ function CSAR:onafterStart(From, Event, To)
self.msrs:SetCoalition(self.coalition)
self.msrs:SetVoice(self.SRSVoice)
self.msrs:SetGender(self.SRSGender)
if self.SRSGPathToCredentials then
if self.SRSGPathToCredentials and (not self.SRSProvider) then
self.msrs:SetProviderOptionsGoogle(self.SRSGPathToCredentials,self.SRSGPathToCredentials)
self.msrs:SetProvider(MSRS.Provider.GOOGLE)
end
+3 -1
View File
@@ -332,7 +332,7 @@ CHIEF.Strategy = {
--- CHIEF class version.
-- @field #string version
CHIEF.version="0.7.0"
CHIEF.version="0.7.1"
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- TODO list
@@ -388,6 +388,8 @@ function CHIEF:New(Coalition, AgentSet, Alias)
self:SetBorderZones()
self:SetConflictZones()
self:SetAttackZones()
self:SetCorridorZones()
self:SetRejectZones()
self:SetThreatLevelRange()
-- Init stuff.
+1 -1
View File
@@ -1474,7 +1474,7 @@ function COHORT:_CheckAmmo()
-- Descriptors.
local Desc=weapon["desc"]
-- Warhead.
local Warhead=Desc["warhead"]
+17 -19
View File
@@ -116,7 +116,7 @@ INTEL = {
DopplerNotchSin = math.sin(math.rad(15)),
DopplerMinSpeedMps = 50,
DopplerRCS = true,
DopplerRadarRangeM = 200 * 1000,
RangeM = 200 * 1000,
}
--- Detected item info.
@@ -2630,6 +2630,7 @@ end
-- Default true.
-- @return #INTEL self
function INTEL:SetDopplerRadar(MinAltAGL, NotchHalfDeg, MinSpeedMps, RadarRangeKm, RCS)
self:T(self.lid .. "SetDopplerRadar")
self.DopplerRadar = true
self.DopplerMinAltAGL = MinAltAGL or 500
self.DopplerNotchSin = math.sin(math.rad(NotchHalfDeg or 15))
@@ -2643,6 +2644,7 @@ end
-- @param #INTEL self
-- @return #INTEL self
function INTEL:SetDopplerRadarOff()
self:T(self.lid .. "SetDopplerRadarOff")
self.DopplerRadar = false
return self
end
@@ -2654,6 +2656,7 @@ end
-- @param #number RCS_m2 Side-on RCS in m²
-- @return #INTEL self
function INTEL:SetTypeRCS(TypeName, RCS_m2)
self:T(self.lid .. "SetTypeRCS")
INTEL.RCS_Table[TypeName] = RCS_m2
return self
end
@@ -2676,6 +2679,7 @@ end
-- @param DCS#Vec3 tvel Target velocity vector (pre-computed)
-- @return #number Effective RCS in m²
function INTEL:_GetAspectRCS(TargetUnit, rpos, spd, tvel)
self:T(self.lid .. "_GetAspectRCS")
-- Look up base (side-on) RCS
local typename = TargetUnit:GetTypeName()
local base_rcs = INTEL.RCS_Table[typename]
@@ -2713,12 +2717,12 @@ end
-- @return #boolean true = detected
-- @return #string rejection reason: "speed" | "clutter" | "notch" | "rcs"
function INTEL:_CheckDopplerDetection(TargetUnit, RadarUnit)
self:T(self.lid .. "_CheckDopplerDetection")
-- Pre-compute common geometry (shared by notch + RCS checks)
local spd = TargetUnit:GetVelocityMPS()
local rpos = RadarUnit:GetVec3()
local tpos = TargetUnit:GetVec3()
local tvel = TargetUnit:GetVelocity()
local tvel = TargetUnit:GetVelocityVec3()
local dx = tpos.x - rpos.x
local dz = tpos.z - rpos.z
@@ -2795,18 +2799,14 @@ end
-- @param #boolean DetectIRST (Optional) If *false*, do not include targets detected by IRST.
-- @param #boolean DetectRWR (Optional) If *false*, do not include targets detected by RWR.
-- @param #boolean DetectDLINK (Optional) If *false*, do not include targets detected by data link.
function INTEL:GetDetectedUnitsDoppler(Unit, DetectedUnits, RecceDetecting,
DetectVisual, DetectOptical, DetectRadar,
DetectIRST, DetectRWR, DetectDLINK)
function INTEL:GetDetectedUnitsDoppler(Unit, DetectedUnits, RecceDetecting,DetectVisual, DetectOptical, DetectRadar,DetectIRST, DetectRWR, DetectDLINK)
self:T(self.lid .. "GetDetectedUnitsDoppler")
-- Run the original detection
self:GetDetectedUnits(Unit,DetectedUnits,RecceDetecting,DetectVisual,DetectOptical,DetectRadar,DetectIRST,DetectRWR,DetectDLINK)(self, Unit, DetectedUnits, RecceDetecting,
DetectVisual, DetectOptical, DetectRadar,
DetectIRST, DetectRWR, DetectDLINK)
self:GetDetectedUnits(Unit,DetectedUnits,RecceDetecting,DetectVisual,DetectOptical,DetectRadar,DetectIRST,DetectRWR,DetectDLINK)
-- Apply Doppler post-filter only when radar channel is active
if not self.DopplerRadar then return end
if DetectRadar == false then return end
if self.DopplerRadar == false then return end
if DetectRadar == false then return end
local remove = {}
for name, unit in pairs(DetectedUnits) do
@@ -2815,11 +2815,9 @@ function INTEL:GetDetectedUnitsDoppler(Unit, DetectedUnits, RecceDetecting,
local ok, reason = self:_CheckDopplerDetection(unit, Unit)
if not ok then
table.insert(remove, name)
if self.verbose and self.verbose >= 2 then
self:T(string.format(
"%sDoppler: suppressed %s [%s] by %s",
self.lid, name, reason, Unit:GetName()))
end
--if self.verbose and self.verbose >= 2 then
self:T(string.format("%sDoppler: suppressed %s [%s] by %s",self.lid, name, reason, Unit:GetName()))
--end
end
end
end
@@ -3030,7 +3028,7 @@ end
-- @return #INTEL_DLINK self
function INTEL_DLINK:SetDLinkCacheTime(seconds)
self.cachetime = math.abs(seconds or 120)
self:I(self.lid.."Caching for "..self.cachetime.." seconds.")
self:T(self.lid.."Caching for "..self.cachetime.." seconds.")
return self
end
@@ -3120,7 +3118,7 @@ end
function INTEL_DLINK:onafterStop(From, Event, To)
self:T({From, Event, To})
local text = string.format("Version %s stopped.", self.version)
self:I(self.lid .. text)
self:T(self.lid .. text)
return self
end