From d3e93c9dc1530b6bc861451d05824dbcbe5251e8 Mon Sep 17 00:00:00 2001 From: xrufix Date: Mon, 1 Jan 2018 01:01:09 +0100 Subject: [PATCH] Add Kh25ML Laser Guided AGMs (#5912) --- addons/maverick/CfgAmmo.hpp | 35 +++++++++++++++++++++++++++- addons/maverick/CfgMagazines.hpp | 39 ++++++++++++++++++++++++++++++++ addons/maverick/CfgWeapons.hpp | 18 +++++++++++++++ addons/maverick/README.md | 7 +++--- addons/maverick/config.cpp | 13 +++++++---- addons/maverick/stringtable.xml | 14 ++++++++++++ 6 files changed, 118 insertions(+), 8 deletions(-) diff --git a/addons/maverick/CfgAmmo.hpp b/addons/maverick/CfgAmmo.hpp index cd53935a2e..275e9d739e 100644 --- a/addons/maverick/CfgAmmo.hpp +++ b/addons/maverick/CfgAmmo.hpp @@ -6,7 +6,7 @@ class CfgAmmo { class Missile_AGM_02_F : MissileBase {}; class GVAR(L) : Missile_AGM_02_F { - author = "rufix"; + author = "xrufix"; autoSeekTarget = 0; irLock = 0; laserLock = 0; @@ -39,4 +39,37 @@ class CfgAmmo { attackProfiles[] = {"maverick"}; }; }; + + class Missile_AGM_01_F : MissileBase {}; + class ace_kh25ml : Missile_AGM_01_F { + author = "xrufix"; + irLock = 0 + missileLockMaxDistance = 10000; + weaponLockSystem = 4; + class ace_missileguidance { + enabled = 1; + + minDeflection = 0.0005; + maxDeflection = 0.01; + incDeflection = 0.005; + + canVanillaLock = 0; + + defaultSeekerType = "SALH"; + seekerTypes[] = {"SALH"}; + + defaultSeekerLockMode = "LOAL"; + seekerLockModes[] = {"LOAL"}; + + seekLastTargetPos = 1; + seekerAngle = 40; + seekerAccuracy = 1; + + seekerMinRange = 1; + seekerMaxRange = 10000; + + defaultAttackProfile = "maverick"; + attackProfiles[] = {"maverick"}; + }; + }; }; diff --git a/addons/maverick/CfgMagazines.hpp b/addons/maverick/CfgMagazines.hpp index e3fd9d2194..3254f605c0 100644 --- a/addons/maverick/CfgMagazines.hpp +++ b/addons/maverick/CfgMagazines.hpp @@ -71,4 +71,43 @@ class CfgMagazines { displayNameShort = CSTRING(L_MAG_short); pylonWeapon = QGVAR(L_Launcher); }; + + // KH-25 + class 4Rnd_Missile_AGM_01_F; + class PylonRack_1Rnd_Missile_AGM_01_F : 4Rnd_Missile_AGM_01_F {}; + class magazine_Missile_AGM_KH25_x1 : VehicleMagazine {}; + class PylonMissile_Missile_AGM_KH25_x1 : magazine_Missile_AGM_KH25_x1 {}; + class PylonMissile_Missile_AGM_KH25_INT_x1 : PylonMissile_Missile_AGM_KH25_x1 {}; + + class ace_kh25ml_pylonrack_x1 : PylonRack_1Rnd_Missile_AGM_01_F { + ammo = "ace_kh25ml"; + author = "xrufix"; + descriptionShort = CSTRING(KH25ML_MAG_DESCR); + displayName = CSTRING(KH25ML_MAG_x1); + displayNameShort = CSTRING(L_MAG_short); + pylonWeapon = "ace_kh25ml_launcher"; + }; + class ace_kh25ml_magazine_x1 : magazine_Missile_AGM_KH25_x1 { + ammo = "ace_kh25ml"; + author = "xrufix"; + descriptionShort = CSTRING(KH25ML_MAG_DESCR); + displayName = CSTRING(KH25ML_MAG_x1); + displayNameShort = CSTRING(L_MAG_short); + }; + class ace_kh25ml_pylonmissile_x1 : PylonMissile_Missile_AGM_KH25_x1 { + ammo = "ace_kh25ml"; + author = "xrufix"; + descriptionShort = CSTRING(KH25ML_MAG_DESCR); + displayName = CSTRING(KH25ML_MAG_x1); + displayNameShort = CSTRING(L_MAG_short); + pylonWeapon = "ace_kh25ml_launcher"; + }; + class ace_kh25ml_pylonmissile_int_x1 : PylonMissile_Missile_AGM_KH25_INT_x1 { + ammo = "ace_kh25ml"; + author = "xrufix"; + descriptionShort = CSTRING(KH25ML_MAG_DESCR); + displayName = CSTRING(KH25ML_MAG_x1); + displayNameShort = CSTRING(L_MAG_short); + pylonWeapon = "ace_kh25ml_launcher"; + }; }; diff --git a/addons/maverick/CfgWeapons.hpp b/addons/maverick/CfgWeapons.hpp index 7a526c8692..c3157f34dd 100644 --- a/addons/maverick/CfgWeapons.hpp +++ b/addons/maverick/CfgWeapons.hpp @@ -45,4 +45,22 @@ class CfgWeapons { EGVAR(laser,showHud) = 1; // show attack profile / lock on hud GVAR(enabled) = 1; }; + + class weapon_AGM_KH25Launcher : MissileLauncher {}; + class ace_kh25ml_launcher : weapon_AGM_KH25Launcher { + author = "xrufix"; + displayName = CSTRING(KH25ML); + magazines[] = { + "ace_kh25ml_pylonrack_x1", + "ace_kh25ml_magazine_x1", + "ace_kh25ml_pylonmissile_x1", + "ace_kh25ml_pylonmissile_int_x1" + }; + weaponLockDelay = 0.1; + weaponLockSystem = 0; + + EGVAR(laser,canSelect) = 1; // can ace_laser lock (allows switching laser code) + EGVAR(laser,showHud) = 1; // show attack profile / lock on hud + GVAR(enabled) = 1; + }; }; diff --git a/addons/maverick/README.md b/addons/maverick/README.md index da103dbd7f..a931a2bc08 100644 --- a/addons/maverick/README.md +++ b/addons/maverick/README.md @@ -1,11 +1,12 @@ ace_maverick ========== -Adds pylon magazines with laser guided AGM-65 Maverick L. +Adds pylon magazines with laser guided AGM-65 Maverick L and KH25ML. -* The magazines can be added to every plane the vanilla Macer II can be added to. +* The Mavericks can be added to every plane the vanilla Macer II can be added to. +* The KH25ML can be added to every plane the vanilla KH25 and Sharur missiles can be added to. * The missile uses laser guidance based on ACE's Advanced Missile Guidance framework. -* The PylonWeapon from CfgWeapons is added to planes with pylons automatically. +* The PylonWeapon is added to planes with pylons automatically. ![Laser guided Maverick](https://upload.wikimedia.org/wikipedia/commons/thumb/c/c3/US_Navy_041128-N-5345W-016_Aviation_Ordnanceman_3rd_Class_William_Miller_arms_a_AGM-65_Maverick_laser-guided_missile.jpg/1280px-US_Navy_041128-N-5345W-016_Aviation_Ordnanceman_3rd_Class_William_Miller_arms_a_AGM-65_Maverick_laser-guided_missile.jpg) diff --git a/addons/maverick/config.cpp b/addons/maverick/config.cpp index 2d8f43f64f..dbfabf7f9d 100644 --- a/addons/maverick/config.cpp +++ b/addons/maverick/config.cpp @@ -4,13 +4,14 @@ class CfgPatches { class ADDON { name = COMPONENT_NAME; requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ace_hellfire"}; + requiredAddons[] = {"ace_missileguidance"}; author = ECSTRING(common,ACETeam); authors[] = {"xrufix"}; url = ECSTRING(main,URL); VERSION_CONFIG; ammo[] = { - GVAR(L) + GVAR(L), + "ace_kh25ml" }; magazines[] = { QGVAR(L_magazine_x1), @@ -19,11 +20,15 @@ class CfgPatches { QGVAR(L_pylonRack_1Rnd), QGVAR(L_PylonRack_3Rnd), QGVAR(L_PylonRack_x1), - QGVAR(L_PylonRack_x2) + QGVAR(L_PylonRack_x2), + "ace_kh25ml_magazine_x1", + "ace_kh25ml_pylonmissile_x1", + "ace_kh25ml_pylonmissile_int_x1" }; weapons[] = { GVAR(L_Launcher_Plane), - GVAR(L_Launcher) + GVAR(L_Launcher), + "ace_kh25ml_launcher" }; units[] = {}; }; diff --git a/addons/maverick/stringtable.xml b/addons/maverick/stringtable.xml index 0f221f1deb..32d00eabb7 100644 --- a/addons/maverick/stringtable.xml +++ b/addons/maverick/stringtable.xml @@ -47,6 +47,15 @@ 雷射导引 레이저 유도 + + Kh-25ML, Laser Guided Air-to-Ground-Missile + Ch-25ML, Lasergelenkte Luft-Boden-Rakete + + + 1x Kh-25ML [ACE] + 1x Ch-25ML [ACE] + 1x Х-25МЛ [ACE] + @@ -58,6 +67,11 @@ AGM-65"小牛"飞弹L型 AGM-65 Maverick L + + Kh-25ML + Ch-25ML + Х-25МЛ +