From 35c48c8915da967b8d369b4519d18bd4c0f847f4 Mon Sep 17 00:00:00 2001 From: Brandon Danyluk Date: Mon, 12 Apr 2021 01:43:35 -0600 Subject: [PATCH] fix dagr --- addons/missileguidance/CfgAmmo.hpp | 10 +++++---- addons/missileguidance/CfgMagazines.hpp | 22 +++++++++++++++++++ addons/missileguidance/CfgWeapons.hpp | 7 +++++- .../functions/fnc_seekerType_SALH.sqf | 4 ++++ addons/missileguidance/todo.txt | 2 +- 5 files changed, 39 insertions(+), 6 deletions(-) diff --git a/addons/missileguidance/CfgAmmo.hpp b/addons/missileguidance/CfgAmmo.hpp index a2f0724bf3..adeb891e71 100644 --- a/addons/missileguidance/CfgAmmo.hpp +++ b/addons/missileguidance/CfgAmmo.hpp @@ -20,19 +20,21 @@ class CfgAmmo { class ADDON { enabled = 1; - minDeflection = 0.0005; // Minium flap deflection for guidance - maxDeflection = 0.0025; // Maximum flap deflection for guidance - incDeflection = 0.0005; // The incrmeent in which deflection adjusts. + pitchRate = 50; // degrees per second + yawRate = 50; canVanillaLock = 0; // Can this default vanilla lock? Only applicable to non-cadet mode // Guidance type for munitions defaultSeekerType = "SALH"; - seekerTypes[] = { "SALH", "LIDAR", "SARH", "Optic", "Thermal", "GPS", "SACLOS", "MCLOS" }; + seekerTypes[] = { "SALH" }; defaultSeekerLockMode = "LOAL"; seekerLockModes[] = { "LOAL", "LOBL" }; + defaultNavigationType = "ProportionalNavigation"; + navigationTypes[] = { "ProportionalNavigation" }; + seekerAngle = 90; // Angle in front of the missile which can be searched seekerAccuracy = 1; // seeker accuracy multiplier diff --git a/addons/missileguidance/CfgMagazines.hpp b/addons/missileguidance/CfgMagazines.hpp index 7cc33b17a3..aab0a06170 100644 --- a/addons/missileguidance/CfgMagazines.hpp +++ b/addons/missileguidance/CfgMagazines.hpp @@ -24,4 +24,26 @@ class CfgMagazines { descriptionShort = "24 Round DAGR"; weight = 72; }; + + class PylonRack_12Rnd_PG_missiles; + class PylonRack_6Rnd_ACE_DAGR: PylonRack_12Rnd_PG_missiles { + ammo = "ACE_Hydra70_DAGR"; + displayName = "6x DAGR [ACE]"; + count = 6; + pylonWeapon = QGVAR(dagr); + }; + + class PylonRack_12Rnd_ACE_DAGR: PylonRack_12Rnd_PG_missiles { + ammo = "ACE_Hydra70_DAGR"; + displayName = "12x DAGR [ACE]"; + count = 12; + pylonWeapon = QGVAR(dagr); + }; + + class PylonRack_24Rnd_ACE_DAGR: PylonRack_12Rnd_PG_missiles { + ammo = "ACE_Hydra70_DAGR"; + displayName = "24x DAGR [ACE]"; + count = 24; + pylonWeapon = QGVAR(dagr); + }; }; diff --git a/addons/missileguidance/CfgWeapons.hpp b/addons/missileguidance/CfgWeapons.hpp index b03628e777..d88cf27b53 100644 --- a/addons/missileguidance/CfgWeapons.hpp +++ b/addons/missileguidance/CfgWeapons.hpp @@ -2,8 +2,13 @@ class CfgWeapons { class missiles_DAGR; class GVAR(dagr): missiles_DAGR { + EGVAR(laser,canSelect) = 1; // can ace_laser lock (allows switching laser code) + EGVAR(laser,showHud) = 1; // show attack profile / lock on hud + magazines[] = {"6Rnd_ACE_Hydra70_DAGR","12Rnd_ACE_Hydra70_DAGR","24Rnd_ACE_Hydra70_DAGR","PylonRack_6Rnd_ACE_DAGR","PylonRack_12Rnd_ACE_DAGR","PylonRack_24Rnd_ACE_DAGR"}; + + autoFire = 0; canLock = 0; - magazines[] = {"6Rnd_ACE_Hydra70_DAGR","12Rnd_ACE_Hydra70_DAGR","24Rnd_ACE_Hydra70_DAGR"}; + weaponLockSystem = 0; lockingTargetSound[] = {"",0,1}; lockedTargetSound[] = {"",0,1}; }; diff --git a/addons/missileguidance/functions/fnc_seekerType_SALH.sqf b/addons/missileguidance/functions/fnc_seekerType_SALH.sqf index e36d57be6e..f08aeac9f9 100644 --- a/addons/missileguidance/functions/fnc_seekerType_SALH.sqf +++ b/addons/missileguidance/functions/fnc_seekerType_SALH.sqf @@ -29,6 +29,10 @@ private _laserResult = [(getPosASL _projectile), (velocity _projectile), _seeker private _foundTargetPos = _laserResult select 0; TRACE_1("Search", _laserResult); +if (isNil "_foundTargetPos") exitWith { + [0, 0, 0] +}; + // average out any error from laser jump private _positionSum = [0, 0, 0]; { diff --git a/addons/missileguidance/todo.txt b/addons/missileguidance/todo.txt index 23f607f167..0d3cb11e1b 100644 --- a/addons/missileguidance/todo.txt +++ b/addons/missileguidance/todo.txt @@ -24,7 +24,7 @@ Navigation Types: X Javelin - Pro Nav X Hellfire - Pro Nav X AGM-65 - Pro Nav - DAGR - Pro Nav + X DAGR - Pro Nav Navigation States: Todo