Change AIM-9 agility

This commit is contained in:
Brandon Danyluk 2021-04-16 16:18:28 -06:00
parent 1b000d658a
commit 8f03b5be9e
2 changed files with 24 additions and 10 deletions

View File

@ -7,8 +7,8 @@ class CfgAmmo {
class ace_missileguidance {
enabled = 1;
pitchRate = 45; // Minium flap deflection for guidance
yawRate = 45; // Maximum flap deflection for guidance
pitchRate = 25; // Minium flap deflection for guidance
yawRate = 25; // Maximum flap deflection for guidance
canVanillaLock = 1; // Can this default vanilla lock? Only applicable to non-cadet mode
@ -46,8 +46,8 @@ class CfgAmmo {
class ace_missileguidance {
enabled = 1;
pitchRate = 65; // Minium flap deflection for guidance
yawRate = 65; // Maximum flap deflection for guidance
pitchRate = 30; // Minium flap deflection for guidance
yawRate = 30; // Maximum flap deflection for guidance
canVanillaLock = 1; // Can this default vanilla lock? Only applicable to non-cadet mode

View File

@ -8,17 +8,31 @@ _camera cameraEffect ["internal", "back"];
_camera camCommitPrepared 0;
GVAR(debug_camera_close) = false;
private _displayEH = (findDisplay 46) displayAddEventHandler ["KeyDown", {
params ["_displayorcontrol", "_key", "_shift", "_ctrl", "_alt"];
GVAR(debug_camera_close) = (_key == 1);
true
}];
[{
params ["_args", "_pfh"];
_args params ["_projectile", "_camera", "_projectilePos"];
if !(alive _projectile) exitWith {
_args params ["_projectile", "_camera", "_projectilePos", "_displayEH"];
if (!alive _projectile || GVAR(debug_camera_close)) exitWith {
private _delay = 1.5;
if (GVAR(debug_camera_close)) then {
_delay = 0;
};
(findDisplay 46) displayRemoveEventHandler ["KeyDown", _displayEH];
[{
params ["_camera"];
_camera cameraEffect ["terminate", "back"];
_camera camCommitPrepared 0;
camDestroy _camera;
}, [_camera], 1.5] call CBA_fnc_waitAndExecute;
}, [_camera], _delay] call CBA_fnc_waitAndExecute;
_camera camPrepareTarget _projectilePos;
_camera camCommitPrepared 0;
@ -28,9 +42,9 @@ _camera camCommitPrepared 0;
private _currentProjectilePos = getPosATLVisual _projectile;
_camera camPrepareTarget _currentProjectilePos;
_camera camPreparePos (_currentProjectilePos vectorDiff ((vectorNormalized velocity _projectile) vectorMultiply 5));
_camera camPrepareTarget _projectile;
_camera camPrepareRelPos [0, -5, 1];
_camera camCommitPrepared 0;
_args set [2, getPosATL _projectile];
}, 0, [_projectile, _camera, getPosATL _projectile]] call CBA_fnc_addPerFrameHandler;
}, 0, [_projectile, _camera, getPosATL _projectile, _displayEH]] call CBA_fnc_addPerFrameHandler;