diff --git a/addons/javelin/CfgVehicles.hpp b/addons/javelin/CfgVehicles.hpp
new file mode 100644
index 0000000000..5ea7e3327c
--- /dev/null
+++ b/addons/javelin/CfgVehicles.hpp
@@ -0,0 +1,32 @@
+class CfgVehicles {
+ class LandVehicle;
+ class StaticWeapon : LandVehicle {
+ class Turrets;
+ };
+
+ class StaticMGWeapon : StaticWeapon {
+ class Turrets : Turrets {
+ class MainTurret;
+ };
+ };
+
+
+ class AT_01_base_F: StaticMGWeapon {
+ class Turrets : Turrets {
+ class MainTurret : MainTurret {
+ weapons[] = { "missiles_titan_static_at" };
+ magazines[] = {"1Rnd_GAT_missiles","1Rnd_GAT_missiles","1Rnd_GAT_missiles","1Rnd_GAT_missiles"};
+
+ turretInfoType = "ACE_RscOptics_javelin";
+ gunnerOpticsModel = PATHTOF(data\reticle_titan.p3d);
+ opticsZoomMin = 0.08333;
+ opticsZoomMax = 0.04167;
+ opticsZoomInit = 0.08333;
+ opticsPPEffects[] = {"OpticsCHAbera1","OpticsBlur1"};
+ opticsFlare = 0;
+ discretefov[] = {0.08333,0.04167};
+ discreteInitIndex = 0;
+ };
+ };
+ };
+};
\ No newline at end of file
diff --git a/addons/javelin/CfgWeapons.hpp b/addons/javelin/CfgWeapons.hpp
index 4e7091c653..1392cd1a56 100644
--- a/addons/javelin/CfgWeapons.hpp
+++ b/addons/javelin/CfgWeapons.hpp
@@ -1,17 +1,38 @@
class CfgWeapons {
class Launcher;
+ class MissileLauncher;
+
class Launcher_Base_F : Launcher {
class WeaponSlotsInfo;
- };
+ };
+
+ // @TODO: AA by default, motherfuckers
+ class missiles_titan : MissileLauncher {
+
+ };
- class launch_Titan_base : Launcher_Base_F {
+ class missiles_titan_at : missiles_titan {
weaponInfoType = "ACE_RscOptics_javelin";
modelOptics = PATHTOF(data\reticle_titan.p3d);
- canLock = 1;
+ canLock = 0;
+ magazines[] = {"1Rnd_GAT_missiles"};
+ lockingTargetSound[] = {"",0,1};
+ lockedTargetSound[] = {"",0,1};
+ };
+ class missiles_titan_static_at : missiles_titan_at { };
+
+ // @TODO: AA by default, motherfuckers
+ class launch_Titan_base : Launcher_Base_F {};
+
+ class launch_Titan_short_base : launch_Titan_base {
+ weaponInfoType = "ACE_RscOptics_javelin";
+ modelOptics = PATHTOF(data\reticle_titan.p3d);
+
+ canLock = 0;
lockingTargetSound[] = {"",0,1};
- lockedTargetSound[] = {"",0,1};
+ lockedTargetSound[] = {"",0,1};
};
};
\ No newline at end of file
diff --git a/addons/javelin/RscInGameUI.hpp b/addons/javelin/RscInGameUI.hpp
index d845c1d00b..ea1e12626c 100644
--- a/addons/javelin/RscInGameUI.hpp
+++ b/addons/javelin/RscInGameUI.hpp
@@ -255,9 +255,9 @@ class RscInGameUI {
idc = 6999;
x = "SafezoneX";
- y = "SafezoneY";
- w = "SafezoneW";
- h = "SafezoneH";
+ y = "SafezoneY";
+ w = "SafezoneW";
+ h = "SafezoneH";
enabled = 0;
class Controls {
diff --git a/addons/javelin/config.cpp b/addons/javelin/config.cpp
index 9d7c14e448..cb76da0010 100644
--- a/addons/javelin/config.cpp
+++ b/addons/javelin/config.cpp
@@ -13,4 +13,5 @@ class CfgPatches {
#include "CfgEventhandlers.hpp"
#include "RscInGameUI.hpp"
#include "CfgSounds.hpp"
-#include "CfgWeapons.hpp"
\ No newline at end of file
+#include "CfgWeapons.hpp"
+#include "CfgVehicles.hpp"
\ No newline at end of file
diff --git a/addons/javelin/functions/fnc_onFired.sqf b/addons/javelin/functions/fnc_onFired.sqf
index 04a023c9d8..8c6590f5df 100644
--- a/addons/javelin/functions/fnc_onFired.sqf
+++ b/addons/javelin/functions/fnc_onFired.sqf
@@ -6,7 +6,10 @@ PARAMS_7(_shooter,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
// Bail on not missile
if( _shooter != ACE_player) exitWith { false };
-if( ! ([ (configFile >> "CfgWeapons" >> (currentWeapon (vehicle ACE_player)) ), "launch_Titan_base"] call EFUNC(common,inheritsFrom)) ) exitWith { };
+if( ! ([ (configFile >> "CfgWeapons" >> (currentWeapon (vehicle ACE_player)) ), "launch_Titan_short_base"] call EFUNC(common,inheritsFrom))
+ &&
+ { ! ([ (configFile >> "CfgWeapons" >> (currentWeapon (vehicle ACE_player)) ), "missiles_titan_at"] call EFUNC(common,inheritsFrom)) }
+) exitWith { };
_pfh_handle = uiNamespace getVariable ["ACE_RscOptics_javelin_PFH", nil];
if(!isNil "_pfh_handle") then {
diff --git a/addons/javelin/functions/fnc_onOpticDraw.sqf b/addons/javelin/functions/fnc_onOpticDraw.sqf
index 13669b9d2e..adbd2fde1c 100644
--- a/addons/javelin/functions/fnc_onOpticDraw.sqf
+++ b/addons/javelin/functions/fnc_onOpticDraw.sqf
@@ -30,13 +30,18 @@ _soundTime = _args select 4;
_randomLockInterval = _args select 5;
_fireDisabledEH = _args select 6;
-if( ! ([ (configFile >> "CfgWeapons" >> (currentWeapon (vehicle ACE_player)) ), "launch_Titan_base"] call EFUNC(common,inheritsFrom)) ) exitWith {
+if( ! ([ (configFile >> "CfgWeapons" >> (currentWeapon (vehicle ACE_player)) ), "launch_Titan_short_base"] call EFUNC(common,inheritsFrom))
+ &&
+ { ! ([ (configFile >> "CfgWeapons" >> (currentWeapon (vehicle ACE_player)) ), "missiles_titan_at"] call EFUNC(common,inheritsFrom)) }
+ ) exitWith {
__JavelinIGUITargeting ctrlShow false;
__JavelinIGUITargetingGate ctrlShow false;
__JavelinIGUITargetingLines ctrlShow false;
__JavelinIGUITargetingConstraints ctrlShow false;
- _fireDisabledEH = [_fireDisabledEH] call FUNC(enableFire);
+ if(!isNil "_fireDisabledEH") then {
+ _fireDisabledEH = [_fireDisabledEH] call FUNC(enableFire);
+ };
[(_this select 1)] call cba_fnc_removePerFrameHandler;
uiNamespace setVariable["ACE_RscOptics_javelin_PFH", nil];
@@ -55,13 +60,21 @@ if ((velocity ACE_player) distance [0,0,0] > 0.5 && {cameraView == "GUNNER"} &&
// bail on not loaded
-if (ACE_player ammo (currentWeapon ACE_player) == 0) exitWith { };
-
+if( (vehicle ACE_player) != ACE_player) then {
+ if( (vehicle player) magazineTurretAmmo ["1Rnd_GAT_missiles", [0]] < 1) exitWith {
+ TRACE_1("No turret ammo, exit", "");
+ };
+} else {
+ if (ACE_player ammo (currentWeapon ACE_player) < 1 ) exitWith {
+ TRACE_1("No ammo, exit", "");
+ };
+};
+
_range = parseNumber (ctrlText __JavelinIGUIRangefinder);
TRACE_1("Viewing range", _range);
if (_range > 50 && {_range < 2500}) then {
_pos = positionCameraToWorld [0,0,_range];
- _targetArray = _pos nearEntities ["AllVehicles", _range/25];
+ _targetArray = _pos nearEntities ["AllVehicles", _range/100];
TRACE_1("Searching at range", _targetArray);
if (count (_targetArray) > 0) then {
_newTarget = _targetArray select 0;
@@ -144,6 +157,8 @@ if (isNull _newTarget) then {
// Disallow fire
_fireDisabledEH = [_fireDisabledEH] call FUNC(disableFire);
} else {
+ _fov = [] call CBA_fnc_getFoV;
+ TRACE_1("FOV", _fov);
if (_newTarget distance ACE_player < 2500
&& {(call CBA_fnc_getFoV) select 1 > 9}
&& { (currentVisionMode ACE_player == 2)}
diff --git a/addons/missileguidance/CfgAmmo.hpp b/addons/missileguidance/CfgAmmo.hpp
index 3b74c87065..680a410506 100644
--- a/addons/missileguidance/CfgAmmo.hpp
+++ b/addons/missileguidance/CfgAmmo.hpp
@@ -8,29 +8,29 @@ class CfgAmmo {
class M_PG_AT : MissileBase {
model = "\A3\Weapons_F\Ammo\Rocket_01_fly_F";
- proxyShape = "\A3\Weapons_F\Ammo\Rocket_01_F";
+ proxyShape = "\A3\Weapons_F\Ammo\Rocket_01_F";
irLock = 0;
- laserLock = 0;
- airLock = 0;
- weaponLockSystem = "2 + 16";
+ laserLock = 0;
+ airLock = 0;
+ weaponLockSystem = "2 + 16";
- maxSpeed = 720;
- maxControlRange = 5000;
- maneuvrability = 8;
- timeToLive = 60;
- simulationStep = 0.01;
- airFriction = 0.1;
- sideAirFriction = 0.16;
- initTime = 0.002;
- thrustTime = 1.07;
- thrust = 530;
- fuseDistance = 2;
+ maxSpeed = 720;
+ maxControlRange = 5000;
+ maneuvrability = 8;
+ timeToLive = 60;
+ simulationStep = 0.01;
+ airFriction = 0.1;
+ sideAirFriction = 0.16;
+ initTime = 0.002;
+ thrustTime = 1.07;
+ thrust = 530;
+ fuseDistance = 2;
- effectsMissileInit = "MissileDAR1";
- effectsMissile = "missile2";
- whistleDist = 4;
- muzzleEffect = "";
+ effectsMissileInit = "MissileDAR1";
+ effectsMissile = "missile2";
+ whistleDist = 4;
+ muzzleEffect = "";
// Turn off arma crosshair-guidance
manualControl = 0;
@@ -46,9 +46,6 @@ class CfgAmmo {
minDeflection = 0.00025; // Minium flap deflection for guidance
maxDeflection = 0.001; // Maximum flap deflection for guidance
incDeflection = 0.0005; // The incrmeent in which deflection adjusts.
- //minDeflection = 0.005;
- //maxDeflection = 0.5;
- //incDeflection = 0.005;
canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode
@@ -73,17 +70,17 @@ class CfgAmmo {
class ACE_Hydra70_DAGR : M_PG_AT {
displayName = "$STR_ACE_Hydra70_DAGR";
- displayNameShort = "$STR_ACE_Hydra70_DAGR_Short";
+ displayNameShort = "$STR_ACE_Hydra70_DAGR_Short";
description = "$STR_ACE_Hydra70_DAGR";
- descriptionShort = "$STR_ACE_Hydra70_DAGR_Desc";
+ descriptionShort = "$STR_ACE_Hydra70_DAGR_Desc";
};
class ACE_Hellfire_AGM114K : ACE_Hydra70_DAGR {
displayName = "$STR_ACE_Hellfire_AGM114K";
- displayNameShort = "$STR_ACE_Hellfire_AGM114K_Short";
+ displayNameShort = "$STR_ACE_Hellfire_AGM114K_Short";
- description = "$STR_ACE_Hellfire_AGM114K_desc";
+ description = "$STR_ACE_Hellfire_AGM114K_desc";
descriptionShort = "$STR_ACE_Hellfire_AGM114K_desc";
// @TODO: placeholder model to at least make it look different
@@ -92,21 +89,22 @@ class CfgAmmo {
hit = 1400;
indirectHit = 71;
- indirectHitRange = 4.5;
- effectsMissile = "missile2";
+ indirectHitRange = 4.5;
+ effectsMissile = "missile2";
};
// Titan
class M_Titan_AT : MissileBase {
irLock = 0;
- laserLock = 0;
- airLock = 0;
+ laserLock = 0;
+ airLock = 0;
// Turn off arma crosshair-guidance
manualControl = 0;
- hit = 1400;
-
+ hit = 1400; // default: 800
+ indirectHit = 20;
+ indirectHitRange = 2;
// ACE uses these values
//trackOversteer = 1;
//trackLead = 0;
@@ -118,9 +116,6 @@ class CfgAmmo {
minDeflection = 0.00005; // Minium flap deflection for guidance
maxDeflection = 0.025; // Maximum flap deflection for guidance
incDeflection = 0.00005; // The incrmeent in which deflection adjusts.
- //minDeflection = 0.005;
- //maxDeflection = 0.5;
- //incDeflection = 0.005;
canVanillaLock = 0;
diff --git a/addons/missileguidance/CfgVehicles.hpp b/addons/missileguidance/CfgVehicles.hpp
index 7707717c9e..301795b8d7 100644
--- a/addons/missileguidance/CfgVehicles.hpp
+++ b/addons/missileguidance/CfgVehicles.hpp
@@ -17,7 +17,7 @@ class CfgVehicles {
class MainTurret;
};
};
-
+
class ACE_Comanche_Test : B_Heli_Attack_01_F {
displayName = "ACE_Comanche_Test";
author = "ACE Team";
@@ -30,4 +30,5 @@ class CfgVehicles {
};
};
};
+
};
diff --git a/addons/missileguidance/Example_ACE_MissileGuidance.hpp b/addons/missileguidance/Example_ACE_MissileGuidance.hpp
deleted file mode 100644
index 400a3a9a41..0000000000
--- a/addons/missileguidance/Example_ACE_MissileGuidance.hpp
+++ /dev/null
@@ -1,65 +0,0 @@
-THIS IS A WIP FUNCTIONALITY, DUE TO CHANGE
-
-
- class M_PG_AT : MissileBase {
- model = "\A3\Weapons_F\Ammo\Rocket_01_fly_F";
- proxyShape = "\A3\Weapons_F\Ammo\Rocket_01_F";
-
- irLock = 0;
- laserLock = 0;
- airLock = 0;
- weaponLockSystem = "2 + 16";
-
- maxSpeed = 720;
- maxControlRange = 5000;
- maneuvrability = 8;
- timeToLive = 60;
- simulationStep = 0.01;
- airFriction = 0.1;
- sideAirFriction = 0.16;
- initTime = 0.002;
- thrustTime = 1.07;
- thrust = 530;
- fuseDistance = 2;
-
- effectsMissileInit = "MissileDAR1";
- effectsMissile = "missile2";
- whistleDist = 4;
- muzzleEffect = "";
-
- // Turn off arma crosshair-guidance
- manualControl = 0;
-
- // ACE uses these values
- trackOversteer = 1;
- trackLead = 0;
-
- // Begin ACE guidance Configs
- class ACE_MissileGuidance {
- enabled = 1;
-
- minDeflection = 0.005; // Minium flap deflection for guidance
- maxDeflection = 0.025; // Maximum flap deflection for guidance
- incDeflection = 0.005; // The incrmeent in which deflection adjusts.
- //minDeflection = 0.005;
- //maxDeflection = 0.5;
- //incDeflection = 0.005;
-
- // Guidance type for munitions
- defaultSeekerType = "SALH";
- seekerTypes[] = { "SALH", "LIDAR", "SARH", "Optic", "Thermal", "GPS", "SACLOS", "MCLOS" };
-
- defaultSeekerLockMode = "LOAL";
- seekerLockModes[] = { "LOAL", "LOBL" };
-
- seekerAngle = 90; // Angle in front of the missile which can be searched
- seekerAccuracy = 1; // seeker accuracy multiplier
-
- seekerMinRange = 1;
- seekerMaxRange = 2500; // Range from the missile which the seeker can visually search
-
- // Attack profile type selection
- defaultAttackProfile = "LIN";
- attackProfiles[] = { "LIN", "DIR", "MID", "HI", "TOP", "PYM" };
- };
- };
\ No newline at end of file
diff --git a/addons/missileguidance/functions/fnc_attackProfile_JAV_DIR.sqf b/addons/missileguidance/functions/fnc_attackProfile_JAV_DIR.sqf
index ecb469527a..1e13c57ccc 100644
--- a/addons/missileguidance/functions/fnc_attackProfile_JAV_DIR.sqf
+++ b/addons/missileguidance/functions/fnc_attackProfile_JAV_DIR.sqf
@@ -53,7 +53,7 @@ switch( (_state select 0) ) do {
};
case STAGE_TERMINAL: {
TRACE_1("STAGE_TERMINAL","");
- _returnTargetPos = _seekerTargetPos vectorAdd [0,0,_distanceToTarget * 0.002];
+ _returnTargetPos = _seekerTargetPos;
};
};
diff --git a/addons/missileguidance/functions/fnc_attackProfile_JAV_TOP.sqf b/addons/missileguidance/functions/fnc_attackProfile_JAV_TOP.sqf
index c5933e6df9..e9064da404 100644
--- a/addons/missileguidance/functions/fnc_attackProfile_JAV_TOP.sqf
+++ b/addons/missileguidance/functions/fnc_attackProfile_JAV_TOP.sqf
@@ -70,7 +70,7 @@ switch( (_state select 0) ) do {
case STAGE_TERMINAL: {
TRACE_1("STAGE_TERMINAL","");
//_returnTargetPos = _seekerTargetPos vectorAdd [0,0,_distanceToTarget * 0.02];
- _returnTargetPos = _seekerTargetPos vectorAdd [0,0,_distanceToTarget * 0.002];
+ _returnTargetPos = _seekerTargetPos;
};
};
diff --git a/addons/missileguidance/functions/fnc_guidancePFH.sqf b/addons/missileguidance/functions/fnc_guidancePFH.sqf
index f7fd56c164..2487e3b28f 100644
--- a/addons/missileguidance/functions/fnc_guidancePFH.sqf
+++ b/addons/missileguidance/functions/fnc_guidancePFH.sqf
@@ -92,6 +92,10 @@ if(accTime > 0) then {
drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,1,1,1], ASLtoATL _projectilePos, 0.75, 0.75, 0, str _vectorTo, 1, 0.025, "TahomaB"];
drawLine3D [ASLtoATL _projectilePos, ASLtoATL _profileAdjustedTargetPos, [1,0,0,1]];
+_ps = "#particlesource" createVehicleLocal (ASLtoATL _projectilePos);
+_PS setParticleParams [["\A3\Data_f\cl_basic", 8, 3, 1], "", "Billboard", 1, 3.0141, [0, 0, 2], [0, 0, 0], 1, 1.275, 1, 0, [1, 1], [[1, 0, 0, 1], [1, 0, 0, 1], [1, 0, 0, 1]], [1], 1, 0, "", "", nil];
+_PS setDropInterval 3.0;
+
hintSilent format["d: %1", _distanceToTarget];
#endif
diff --git a/addons/missileguidance/functions/fnc_seekerType_Optic.sqf b/addons/missileguidance/functions/fnc_seekerType_Optic.sqf
index 74d3b0fc71..45e378c975 100644
--- a/addons/missileguidance/functions/fnc_seekerType_Optic.sqf
+++ b/addons/missileguidance/functions/fnc_seekerType_Optic.sqf
@@ -17,6 +17,7 @@ TRACE_1("", _launchParams);
_foundTargetPos = [0,0,0];
if(!isNil "_target") then {
_foundTargetPos = getPosASL _target;
+ //_foundTargetPos = (_target modelToWorldVisual (getCenterOfMass _target));
};
// @TODO: This is seeker LOS and angle checks for LOAL only; LOBL does not need visual
diff --git a/addons/missileguidance/stringtable.xml b/addons/missileguidance/stringtable.xml
index c9cb4c4c6b..ab3a449aa6 100644
--- a/addons/missileguidance/stringtable.xml
+++ b/addons/missileguidance/stringtable.xml
@@ -13,6 +13,9 @@
Fejlett rakétairányító
Расширенный ракетой
+
+ Advanced missile guidance, or AMG, provides multiple enhancements to missile locking and firing. It is also a framework required for missile weapon types.
+
Hydra-70 DAGR Missile