SEAD - calculate HARM impact point from firing position if no target data is given

SHORAD - ignore HARM AGM-88 is not fired at a specific target
This commit is contained in:
Applevangelist
2021-11-21 18:39:46 +01:00
parent 0ac00efda6
commit ab4411e5bb
2 changed files with 195 additions and 94 deletions

View File

@@ -164,7 +164,7 @@ do
self.DefenseLowProb = 70 -- probability to detect a missile shot, low margin
self.DefenseHighProb = 90 -- probability to detect a missile shot, high margin
self.UseEmOnOff = UseEmOnOff or false -- Decide if we are using Emission on/off (default) or AlarmState red/green
self:I("*** SHORAD - Started Version 0.2.9")
self:I("*** SHORAD - Started Version 0.2.10")
-- Set the string id for output to DCS.log file.
self.lid=string.format("SHORAD %s | ", self.name)
self:_InitState()
@@ -506,6 +506,9 @@ do
if (self:_CheckHarms(ShootingWeaponName) or self:_CheckMavs(ShootingWeaponName)) and IsDetected then
-- get target data
local targetdata = EventData.Weapon:getTarget() -- Identify target
-- Is there target data?
if not targetdata then return end
local targetcat = targetdata:getCategory() -- Identify category
self:T(string.format("Target Category (3=STATIC, 1=UNIT)= %s",tostring(targetcat)))
self:T({targetdata})