Update doppler seeker to allow the tracking and killing of projectiles

This commit is contained in:
Brandon Danyluk 2021-05-18 03:44:05 -06:00
parent 36d75765c6
commit f7bd523221
2 changed files with 62 additions and 59 deletions

View File

@ -20,7 +20,6 @@ _stateParams params ["", "_seekerStateParams"];
_launchParams params ["","_targetLaunchParams"]; _launchParams params ["","_targetLaunchParams"];
_targetLaunchParams params ["_target"]; _targetLaunchParams params ["_target"];
_target = missileTarget _projectile;
if (isNull _target && isVehicleRadarOn vehicle _shooter) then { if (isNull _target && isVehicleRadarOn vehicle _shooter) then {
_target = cursorTarget; _target = cursorTarget;
}; };

View File

@ -31,6 +31,8 @@ if (_isActive || { CBA_missionTime >= _timeWhenActive }) then {
TRACE_1("Missile Pitbull",_seekerStateParams); TRACE_1("Missile Pitbull",_seekerStateParams);
}; };
// if we are tracking a projectile, don't bother with radar crap just fly to it
if (!isNil "_target" || { !((typeOf _target) isKindOf ["Default", configFile >> "CfgAmmo"]) }) then {
// Internal radar homing // Internal radar homing
// For performance reasons only poll for target every so often instead of each frame // For performance reasons only poll for target every so often instead of each frame
if ((_lastTargetPollTime + ACTIVE_RADAR_POLL_FREQUENCY) - CBA_missionTime < 0) then { if ((_lastTargetPollTime + ACTIVE_RADAR_POLL_FREQUENCY) - CBA_missionTime < 0) then {
@ -96,6 +98,7 @@ if (_isActive || { CBA_missionTime >= _timeWhenActive }) then {
_expectedTargetPos = _searchPos; _expectedTargetPos = _searchPos;
}; };
};
} else { } else {
if (GVAR(debug_drawGuidanceInfo)) then { if (GVAR(debug_drawGuidanceInfo)) then {
_seekerTypeName = "DOPPLER - EXT"; _seekerTypeName = "DOPPLER - EXT";
@ -125,6 +128,7 @@ if !(isNull _target) then {
private _filterTarget = [_target, _projectile, _minimumFilterSpeed, _minimumFilterTime, _maxTerrainCheck, _seekerAngle] call FUNC(shouldFilterRadarHit); private _filterTarget = [_target, _projectile, _minimumFilterSpeed, _minimumFilterTime, _maxTerrainCheck, _seekerAngle] call FUNC(shouldFilterRadarHit);
if (_filterTarget) then { if (_filterTarget) then {
// filter out target // filter out target
systemChat "filter";
_target = objNull; _target = objNull;
_seekerStateParams set [9, true]; _seekerStateParams set [9, true];
} else { } else {