Skip to content

Commit

Permalink
Fix Mavericks and KH25ML diving into the ground. (#6315)
Browse files Browse the repository at this point in the history
* Fix issue with missiles diving into the ground before reaching the target

* More modest steering deflection for Maverick and Kh25ML
  • Loading branch information
xrufix authored and PabstMirror committed Jun 1, 2018
1 parent a63ddf9 commit 000e217
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
12 changes: 6 additions & 6 deletions addons/maverick/CfgAmmo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;

Expand Down
11 changes: 3 additions & 8 deletions addons/missileguidance/functions/fnc_attackProfile_LIN.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 000e217

Please sign in to comment.