mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
change how IR seeker performs
The angle check is better now. Relative velocites guarenteed
This commit is contained in:
parent
356ff4ce4d
commit
f3bea7bb30
@ -1,7 +1,7 @@
|
|||||||
class CfgAmmo {
|
class CfgAmmo {
|
||||||
class Missile_AA_04_F;
|
class Missile_AA_04_F;
|
||||||
class GVAR(m): Missile_AA_04_F {
|
class GVAR(m): Missile_AA_04_F {
|
||||||
missileLockCone = 45;
|
missileLockCone = 3; // caged lock
|
||||||
missileKeepLockedCone = 45;
|
missileKeepLockedCone = 45;
|
||||||
missileLockMaxDistance = 5000;
|
missileLockMaxDistance = 5000;
|
||||||
missileLockMinDistance = 250;
|
missileLockMinDistance = 250;
|
||||||
@ -45,7 +45,7 @@ class CfgAmmo {
|
|||||||
|
|
||||||
class ammo_Missile_BIM9X;
|
class ammo_Missile_BIM9X;
|
||||||
class GVAR(x): ammo_Missile_BIM9X {
|
class GVAR(x): ammo_Missile_BIM9X {
|
||||||
missileLockCone = 120;
|
missileLockCone = 3; // caged lock
|
||||||
missileKeepLockedCone = 120;
|
missileKeepLockedCone = 120;
|
||||||
missileLockMaxDistance = 5000;
|
missileLockMaxDistance = 5000;
|
||||||
missileLockMinDistance = 250;
|
missileLockMinDistance = 250;
|
||||||
@ -90,7 +90,7 @@ class CfgAmmo {
|
|||||||
// AIM-132
|
// AIM-132
|
||||||
class M_Air_AA;
|
class M_Air_AA;
|
||||||
class GVAR(aim132): M_Air_AA {
|
class GVAR(aim132): M_Air_AA {
|
||||||
missileLockCone = 120;
|
missileLockCone = 3; // caged lock
|
||||||
missileKeepLockedCone = 120;
|
missileKeepLockedCone = 120;
|
||||||
missileLockMaxDistance = 8000;
|
missileLockMaxDistance = 8000;
|
||||||
missileLockMinDistance = 250;
|
missileLockMinDistance = 250;
|
||||||
@ -135,7 +135,7 @@ class CfgAmmo {
|
|||||||
// R-73
|
// R-73
|
||||||
class ammo_Missile_AA_R73;
|
class ammo_Missile_AA_R73;
|
||||||
class GVAR(r73): ammo_Missile_AA_R73 {
|
class GVAR(r73): ammo_Missile_AA_R73 {
|
||||||
missileLockCone = 40;
|
missileLockCone = 3; // caged lock
|
||||||
missileKeepLockedCone = 40;
|
missileKeepLockedCone = 40;
|
||||||
missileLockMaxDistance = 5000;
|
missileLockMaxDistance = 5000;
|
||||||
missileLockMinDistance = 250;
|
missileLockMinDistance = 250;
|
||||||
@ -179,7 +179,7 @@ class CfgAmmo {
|
|||||||
|
|
||||||
class Missile_AA_03_F;
|
class Missile_AA_03_F;
|
||||||
class GVAR(r74): Missile_AA_03_F {
|
class GVAR(r74): Missile_AA_03_F {
|
||||||
missileLockCone = 75;
|
missileLockCone = 3; // caged lock
|
||||||
missileKeepLockedCone = 75;
|
missileKeepLockedCone = 75;
|
||||||
missileLockMaxDistance = 8000;
|
missileLockMaxDistance = 8000;
|
||||||
missileLockMinDistance = 250;
|
missileLockMinDistance = 250;
|
||||||
|
@ -4,6 +4,11 @@ class CfgAmmo {
|
|||||||
maneuvrability = 0;
|
maneuvrability = 0;
|
||||||
missileLockMaxSpeed = 2000;
|
missileLockMaxSpeed = 2000;
|
||||||
|
|
||||||
|
missileLockCone = 3; // caged lock
|
||||||
|
missileKeepLockedCone = 45;
|
||||||
|
missileLockMaxDistance = 5000;
|
||||||
|
missileLockMinDistance = 250;
|
||||||
|
|
||||||
class ace_missileguidance {
|
class ace_missileguidance {
|
||||||
enabled = 1;
|
enabled = 1;
|
||||||
|
|
||||||
@ -43,6 +48,11 @@ class CfgAmmo {
|
|||||||
maneuvrability = 0;
|
maneuvrability = 0;
|
||||||
missileLockMaxSpeed = 2000;
|
missileLockMaxSpeed = 2000;
|
||||||
|
|
||||||
|
missileLockCone = 3; // caged lock
|
||||||
|
missileKeepLockedCone = 45;
|
||||||
|
missileLockMaxDistance = 5000;
|
||||||
|
missileLockMinDistance = 250;
|
||||||
|
|
||||||
class ace_missileguidance {
|
class ace_missileguidance {
|
||||||
enabled = 1;
|
enabled = 1;
|
||||||
|
|
||||||
|
@ -190,7 +190,7 @@ if (_states isEqualTo []) then {
|
|||||||
TRACE_1("navigation on fired",_onFiredFunc);
|
TRACE_1("navigation on fired",_onFiredFunc);
|
||||||
if (_onFiredFunc != "") then {
|
if (_onFiredFunc != "") then {
|
||||||
private _navState = (_args call (missionNamespace getVariable _onFiredFunc));
|
private _navState = (_args call (missionNamespace getVariable _onFiredFunc));
|
||||||
(_navigationStateData select 4) set [4, _navState];
|
(_args select 4) set [4, _navState];
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
{
|
{
|
||||||
|
@ -16,9 +16,9 @@
|
|||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#ifdef DEBUG_MODE_FULL
|
#ifdef DEBUG_MODE_FULL
|
||||||
#define TRACK_ON_PAUSE false
|
#define TRACK_ON_PAUSE true
|
||||||
#else
|
#else
|
||||||
#define TRACK_ON_PAUSE false
|
#define TRACK_ON_PAUSE true
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
_args params ["_firedEH", "_launchParams", "_flightParams", "_seekerParams", "_stateParams", "_targetData"];
|
_args params ["_firedEH", "_launchParams", "_flightParams", "_seekerParams", "_stateParams", "_targetData"];
|
||||||
@ -32,9 +32,6 @@ _targetData params ["_targetDirection", "_attackProfileDirection", "_targetRange
|
|||||||
|
|
||||||
_seekerStateParams params ["_flareDistanceFilter", "_flareAngleFilter", "_trackingTarget"];
|
_seekerStateParams params ["_flareDistanceFilter", "_flareAngleFilter", "_trackingTarget"];
|
||||||
|
|
||||||
private _projectileVelocity = velocity _projectile;
|
|
||||||
private _closingVelocity = _targetVelocity vectorDiff _projectileVelocity;
|
|
||||||
|
|
||||||
private _withinView = [_projectile, getPosASLVisual _trackingTarget, _seekerAngle] call FUNC(checkSeekerAngle);
|
private _withinView = [_projectile, getPosASLVisual _trackingTarget, _seekerAngle] call FUNC(checkSeekerAngle);
|
||||||
private _canSee = [_projectile, _trackingTarget, false] call FUNC(checkLos);
|
private _canSee = [_projectile, _trackingTarget, false] call FUNC(checkLos);
|
||||||
|
|
||||||
@ -82,15 +79,17 @@ if (TRACK_ON_PAUSE || {accTime > 0 && !isGamePaused}) then {
|
|||||||
(_x isEqualTo _target && _trackingTarget isNotEqualTo _target) || { (_withinView && _canSee && _isFlare) }
|
(_x isEqualTo _target && _trackingTarget isNotEqualTo _target) || { (_withinView && _canSee && _isFlare) }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
private _relativeTargetVelocity = _projectile vectorWorldToModelVisual velocity _trackingTarget;
|
||||||
|
_relativeTargetVelocity set [1, 0];
|
||||||
private _foundDecoy = false;
|
private _foundDecoy = false;
|
||||||
{
|
{
|
||||||
if (_trackingTarget isNotEqualTo _x) then {
|
if (_trackingTarget isNotEqualTo _x) then {
|
||||||
private _considering = false;
|
private _considering = false;
|
||||||
|
|
||||||
private _distanceToFlare = _trackingTarget distanceSqr _x;
|
private _flareRelativeVelocity = _projectile vectorWorldToModelVisual velocity _x;
|
||||||
|
_flareRelativeVelocity set [1, 0];
|
||||||
|
private _angleBetweenVelocities = acos (_relativeTargetVelocity vectorCos _flareRelativeVelocity);
|
||||||
if !(_foundDecoy) then {
|
if !(_foundDecoy) then {
|
||||||
private _flareRelativeVelocity = (velocity _x) vectorDiff _projectileVelocity;
|
|
||||||
private _angleBetweenVelocities = acos (_closingVelocity vectorCos _flareRelativeVelocity);
|
|
||||||
if (_angleBetweenVelocities <= _flareAngleFilter) then {
|
if (_angleBetweenVelocities <= _flareAngleFilter) then {
|
||||||
_considering = true;
|
_considering = true;
|
||||||
if (_seekerAccuracy <= random 1) then {
|
if (_seekerAccuracy <= random 1) then {
|
||||||
@ -109,7 +108,7 @@ if (TRACK_ON_PAUSE || {accTime > 0 && !isGamePaused}) then {
|
|||||||
if (_trackingTarget isEqualTo _x) then {
|
if (_trackingTarget isEqualTo _x) then {
|
||||||
_colour = [0, 0, 1, 1];
|
_colour = [0, 0, 1, 1];
|
||||||
};
|
};
|
||||||
drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", _colour, _flarePos, 0.75, 0.75, 0, "F", 1, 0.025, "TahomaB"];
|
drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", _colour, _flarePos, 0.75, 0.75, 0, format ["F %1", _angleBetweenVelocities], 1, 0.025, "TahomaB"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
} forEach _nearby;
|
} forEach _nearby;
|
||||||
|
Loading…
Reference in New Issue
Block a user