From 000e2174d5b1b0e7145ebd087f55c66acb983230 Mon Sep 17 00:00:00 2001 From: xrufix Date: Fri, 1 Jun 2018 04:18:47 +0200 Subject: [PATCH] Fix Mavericks and KH25ML diving into the ground. (#6315) * Fix issue with missiles diving into the ground before reaching the target * More modest steering deflection for Maverick and Kh25ML --- addons/maverick/CfgAmmo.hpp | 12 ++++++------ .../functions/fnc_attackProfile_LIN.sqf | 11 +++-------- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/addons/maverick/CfgAmmo.hpp b/addons/maverick/CfgAmmo.hpp index 27d96d75732..2b48618e82e 100644 --- a/addons/maverick/CfgAmmo.hpp +++ b/addons/maverick/CfgAmmo.hpp @@ -16,9 +16,9 @@ class CfgAmmo { class ace_missileguidance { enabled = 1; - minDeflection = 0.0005; - maxDeflection = 0.01; - incDeflection = 0.005; + minDeflection = 0; + maxDeflection = 0.002; + incDeflection = 0.001; canVanillaLock = 0; @@ -49,9 +49,9 @@ class CfgAmmo { class ace_missileguidance { enabled = 1; - minDeflection = 0.0005; - maxDeflection = 0.01; - incDeflection = 0.005; + minDeflection = 0; + maxDeflection = 0.002; + incDeflection = 0.001; canVanillaLock = 0; diff --git a/addons/missileguidance/functions/fnc_attackProfile_LIN.sqf b/addons/missileguidance/functions/fnc_attackProfile_LIN.sqf index de8061a27c6..2d253406224 100644 --- a/addons/missileguidance/functions/fnc_attackProfile_LIN.sqf +++ b/addons/missileguidance/functions/fnc_attackProfile_LIN.sqf @@ -48,15 +48,10 @@ if ((((ASLtoAGL _projectilePos) select 2) < 5) && {_distanceToShooter < 15}) the }; }; -// Handle arcing terminal low for high decent (when projectile above target) +// Projectile above target if ((_projectilePos select 2) > (_seekerTargetPos select 2)) then { - if (_distanceToTarget < 100) then { - _addHeight = _addHeight vectorDiff [0,0, ((_projectilePos select 2) - (_seekerTargetPos select 2)) * 0.5]; - TRACE_1("above - close",_addHeight); - } else { - TRACE_1("above - far",_addHeight); - _addHeight = _addHeight vectorAdd [0,0, _distanceToTarget*0.02]; - }; + TRACE_1("above - far",_addHeight); + _addHeight = _addHeight vectorAdd [0,0, _distanceToTarget / 50]; }; private _returnTargetPos = _seekerTargetPos vectorAdd _addHeight;