mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Add ability to disable iron dome (disabled by default)
This commit is contained in:
@ -38,7 +38,7 @@ private _heightAboveLaunch = (_projectilePos select 2) - (_launchPos select 2);
|
|||||||
// Add height depending on distance for compensate
|
// Add height depending on distance for compensate
|
||||||
private _returnTargetPos = _seekerTargetPos;
|
private _returnTargetPos = _seekerTargetPos;
|
||||||
if (_returnTargetPos isEqualTo [0, 0, 0]) then {
|
if (_returnTargetPos isEqualTo [0, 0, 0]) then {
|
||||||
_initialDistanceToTarget = 8000;
|
private _initialDistanceToTarget = 8000;
|
||||||
_returnTargetPos = _launchPos vectorAdd (_launchDir vectorMultiply _initialDistanceToTarget);
|
_returnTargetPos = _launchPos vectorAdd (_launchDir vectorMultiply _initialDistanceToTarget);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -109,6 +109,7 @@ switch (_attackStage) do {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// missile guidance defines this variable in doAttackProfile
|
// missile guidance defines this variable in doAttackProfile
|
||||||
|
//IGNORE_PRIVATE_WARNING ["_attackProfileName"];
|
||||||
_attackProfileName = ["na", "hellfire - LAUNCH", "hellfire - SEEK CRUISE", "hellfire - ATTACK CRUISE", "hellfire - TERMINAL"] select _attackStage;
|
_attackProfileName = ["na", "hellfire - LAUNCH", "hellfire - SEEK CRUISE", "hellfire - ATTACK CRUISE", "hellfire - TERMINAL"] select _attackStage;
|
||||||
|
|
||||||
TRACE_1("Adjusted target position", _returnTargetPos);
|
TRACE_1("Adjusted target position", _returnTargetPos);
|
||||||
|
@ -9,3 +9,9 @@ class Extended_PreInit_EventHandlers {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class Extended_PostInit_EventHandlers {
|
||||||
|
class ADDON {
|
||||||
|
init = QUOTE(call COMPILE_SCRIPT(XEH_postInit));
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
7
addons/iron_dome/XEH_postInit.sqf
Normal file
7
addons/iron_dome/XEH_postInit.sqf
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
if (isServer && { GVAR(enable) }) then {
|
||||||
|
[LINKFUNC(projectileTrackerPFH)] call CBA_fnc_addPerFrameHandler;
|
||||||
|
[LINKFUNC(proximityFusePFH)] call CBA_fnc_addPerFrameHandler;
|
||||||
|
};
|
||||||
|
|
@ -31,9 +31,6 @@ if (isServer) then {
|
|||||||
GVAR(interceptors) pushBack [_interceptor, _target, getPosASLVisual _interceptor, _interceptor distance _target];
|
GVAR(interceptors) pushBack [_interceptor, _target, getPosASLVisual _interceptor, _interceptor distance _target];
|
||||||
[GVAR(toBeShot), _target] call CBA_fnc_hashRem;
|
[GVAR(toBeShot), _target] call CBA_fnc_hashRem;
|
||||||
}] call CBA_fnc_addEventHandler;
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
[LINKFUNC(projectileTrackerPFH)] call CBA_fnc_addPerFrameHandler;
|
|
||||||
[LINKFUNC(proximityFusePFH)] call CBA_fnc_addPerFrameHandler;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
[QGVAR(registerLaunchers), {
|
[QGVAR(registerLaunchers), {
|
||||||
|
@ -1,3 +1,13 @@
|
|||||||
|
[
|
||||||
|
QGVAR(enable), "CHECKBOX",
|
||||||
|
[ELSTRING(common,Enabled), LSTRING(enable_description)],
|
||||||
|
LSTRING(category),
|
||||||
|
false, // default value
|
||||||
|
true, // isGlobal
|
||||||
|
{[QGVAR(enable), _this] call EFUNC(common,cbaSettings_settingChanged)},
|
||||||
|
true // Needs mission restart
|
||||||
|
] call CBA_fnc_addSetting;
|
||||||
|
|
||||||
[
|
[
|
||||||
QGVAR(targetRecycleTime), "SLIDER",
|
QGVAR(targetRecycleTime), "SLIDER",
|
||||||
[LSTRING(targetRecycleTime_setting), LSTRING(targetRecycleTime_description)],
|
[LSTRING(targetRecycleTime_setting), LSTRING(targetRecycleTime_description)],
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project name="ACE">
|
<Project name="ACE">
|
||||||
<Package name="IRON_DOME">
|
<Package name="IRON_DOME">
|
||||||
|
<Key ID="STR_ACE_IRON_DOME_enable_description">
|
||||||
|
<English>Enable the Iron Dome system</English>
|
||||||
|
</Key>
|
||||||
<Key ID="STR_ACE_IRON_DOME_category">
|
<Key ID="STR_ACE_IRON_DOME_category">
|
||||||
<English>ACE Iron Dome</English>
|
<English>ACE Iron Dome</English>
|
||||||
</Key>
|
</Key>
|
||||||
|
@ -48,6 +48,7 @@ _targetData set [2, (_projectilePos vectorDistance _missilePosProjected)];
|
|||||||
|
|
||||||
if (GVAR(debug_drawGuidanceInfo)) then {
|
if (GVAR(debug_drawGuidanceInfo)) then {
|
||||||
private _projectilePitch = ((vectorDir _projectile) call CBA_fnc_vect2polar) select 2;
|
private _projectilePitch = ((vectorDir _projectile) call CBA_fnc_vect2polar) select 2;
|
||||||
|
//IGNORE_PRIVATE_WARNING ["_attackProfileName"];
|
||||||
_attackProfileName = format ["JDAM [Pitch - %1 Impact Pitch - %2]", _projectilePitch, _impactAngle];
|
_attackProfileName = format ["JDAM [Pitch - %1 Impact Pitch - %2]", _projectilePitch, _impactAngle];
|
||||||
drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,0,0,1], ASLtoAGL _missilePosProjected, 0.75, 0.75, 0, "P", 1, 0.025, "TahomaB"];
|
drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,0,0,1], ASLtoAGL _missilePosProjected, 0.75, 0.75, 0, "P", 1, 0.025, "TahomaB"];
|
||||||
private _desiredAngle = _lineDir vectorMultiply 5000;
|
private _desiredAngle = _lineDir vectorMultiply 5000;
|
||||||
|
@ -27,7 +27,7 @@ if (_correctionDistance == 0) then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
private _navigationParams = [
|
private _navigationParams = [
|
||||||
_p, _i, _d,
|
_p, 0, _d,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
_correctionDistance
|
_correctionDistance
|
||||||
|
Reference in New Issue
Block a user