Skip to content

Commit

Permalink
Compat RHS/Hellfire - Use RHS models when loaded (acemod#10076)
Browse files Browse the repository at this point in the history
Co-authored-by: PabstMirror <[email protected]>
  • Loading branch information
mrschick and PabstMirror authored Jun 23, 2024
1 parent aed2222 commit bdb6c7c
Showing 9 changed files with 86 additions and 31 deletions.
11 changes: 0 additions & 11 deletions addons/compat_rhs_usf3/CfgMagazineWells.hpp

This file was deleted.

17 changes: 0 additions & 17 deletions addons/compat_rhs_usf3/CfgMagazines.hpp
Original file line number Diff line number Diff line change
@@ -38,21 +38,4 @@ class cfgMagazines {
EGVAR(overpressure,range) = 0;
EGVAR(overpressure,damage) = 0;
};

class rhs_mag_AGM114K_2;
class GVAR(pylon_mag_2rnd_hellfire_k): rhs_mag_AGM114K_2 {
displayName = "2x AGM-114K [ACE]";
pylonWeapon = "ace_hellfire_launcher";
ammo = "ACE_Hellfire_AGM114K";
};
class GVAR(pylon_mag_2rnd_hellfire_n): rhs_mag_AGM114K_2 {
displayName = "2x AGM-114N [ACE]";
pylonWeapon = "ace_hellfire_launcher_N";
ammo = "ACE_Hellfire_AGM114N";
};
class GVAR(pylon_mag_2rnd_hellfire_l): rhs_mag_AGM114K_2 {
displayName = "2x AGM-114L [ACE]";
pylonWeapon = "ace_hellfire_launcher_L";
ammo = "ACE_Hellfire_AGM114L";
};
};
8 changes: 8 additions & 0 deletions addons/compat_rhs_usf3/compat_rhs_usf3_hellfire/CfgAmmo.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
class CfgAmmo {
// Use RHS Hellfire 3D Model on ACE Hellfires
class M_Scalpel_AT;
class ACE_Hellfire_AGM114K: M_Scalpel_AT {
model = "\rhsusf\addons\rhsusf_airweapons\proxyammo\rhsusf_m_AGM114K_fly";
proxyShape = "\rhsusf\addons\rhsusf_airweapons\proxyammo\rhsusf_m_AGM114K";
};
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
class CfgMagazineWells {
class ace_hellfire_K {
ADDON[] = {QGVAR(pylon_mag_2rnd_hellfire_k), QGVAR(pylon_mag_4rnd_hellfire_k)};
};
class ace_hellfire_N {
ADDON[] = {QGVAR(pylon_mag_2rnd_hellfire_n), QGVAR(pylon_mag_4rnd_hellfire_n)};
};
class ace_hellfire_L {
ADDON[] = {QGVAR(pylon_mag_2rnd_hellfire_l), QGVAR(pylon_mag_4rnd_hellfire_l)};
};
};
37 changes: 37 additions & 0 deletions addons/compat_rhs_usf3/compat_rhs_usf3_hellfire/CfgMagazines.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
class CfgMagazines {
// 2x ACE Hellfire racks
class rhs_mag_AGM114K_2;
class GVAR(pylon_mag_2rnd_hellfire_k): rhs_mag_AGM114K_2 {
displayName = "2x AGM-114K [ACE]";
pylonWeapon = "ace_hellfire_launcher";
ammo = "ACE_Hellfire_AGM114K";
};
class GVAR(pylon_mag_2rnd_hellfire_n): rhs_mag_AGM114K_2 {
displayName = "2x AGM-114N [ACE]";
pylonWeapon = "ace_hellfire_launcher_N";
ammo = "ACE_Hellfire_AGM114N";
};
class GVAR(pylon_mag_2rnd_hellfire_l): rhs_mag_AGM114K_2 {
displayName = "2x AGM-114L [ACE]";
pylonWeapon = "ace_hellfire_launcher_L";
ammo = "ACE_Hellfire_AGM114L";
};

// 4x ACE Hellfire racks that align better on RHS Apaches and Blackhawks than the standard ACE 4x racks
class rhs_mag_AGM114K_4;
class GVAR(pylon_mag_4rnd_hellfire_k): rhs_mag_AGM114K_4 {
displayName = "4x AGM-114K [ACE]";
pylonWeapon = "ace_hellfire_launcher";
ammo = "ACE_Hellfire_AGM114K";
};
class GVAR(pylon_mag_4rnd_hellfire_n): rhs_mag_AGM114K_4 {
displayName = "4x AGM-114N [ACE]";
pylonWeapon = "ace_hellfire_launcher_N";
ammo = "ACE_Hellfire_AGM114N";
};
class GVAR(pylon_mag_4rnd_hellfire_l): rhs_mag_AGM114K_4 {
displayName = "4x AGM-114L [ACE]";
pylonWeapon = "ace_hellfire_launcher_L";
ammo = "ACE_Hellfire_AGM114L";
};
};
25 changes: 25 additions & 0 deletions addons/compat_rhs_usf3/compat_rhs_usf3_hellfire/config.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#include "script_component.hpp"

class CfgPatches {
class SUBADDON {
name = COMPONENT_NAME;
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {
"rhsusf_main_loadorder",
"ace_hellfire"
};
skipWhenMissingDependencies = 1;
author = ECSTRING(common,ACETeam);
authors[] = {};
url = ECSTRING(main,URL);
VERSION_CONFIG;

addonRootClass = QUOTE(ADDON);
};
};

#include "CfgAmmo.hpp"
#include "CfgMagazines.hpp"
#include "CfgMagazineWells.hpp"
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#define SUBCOMPONENT hellfire
#define SUBCOMPONENT_BEAUTIFIED Hellfire
#include "..\script_component.hpp"
1 change: 0 additions & 1 deletion addons/compat_rhs_usf3/config.cpp
Original file line number Diff line number Diff line change
@@ -19,7 +19,6 @@ class CfgPatches {
#include "CfgAmmo.hpp"
#include "CfgEventHandlers.hpp"
#include "CfgMagazines.hpp"
#include "CfgMagazineWells.hpp"
#include "CfgWeapons.hpp"
#include "CfgVehicles.hpp"
#include "CfgGlasses.hpp"
4 changes: 2 additions & 2 deletions addons/hellfire/CfgMagazines.hpp
Original file line number Diff line number Diff line change
@@ -32,7 +32,7 @@ class CfgMagazines {
count = 3;
mass = 250;
pylonWeapon = QGVAR(launcher);
hardpoints[] = {"B_MISSILE_PYLON", "UNI_SCALPEL", "CUP_NATO_HELO_LARGE", "RHS_HP_LONGBOW_RACK"};
hardpoints[] = {"B_MISSILE_PYLON", "UNI_SCALPEL", "CUP_NATO_HELO_LARGE"};
model = "\A3\Weapons_F\DynamicLoadout\PylonPod_3x_Missile_LG_scalpel_F.p3d";
mirrorMissilesIndexes[] = {2, 1, 3};
};
@@ -41,7 +41,7 @@ class CfgMagazines {
count = 4;
mass = 340;
pylonWeapon = QGVAR(launcher);
hardpoints[] = {"UNI_SCALPEL", "CUP_NATO_HELO_LARGE", "RHS_HP_HELLFIRE_RACK", "RHS_HP_LONGBOW_RACK"};
hardpoints[] = {"UNI_SCALPEL", "CUP_NATO_HELO_LARGE"};
model = "\A3\Weapons_F\DynamicLoadout\PylonPod_4x_Missile_LG_scalpel_F.p3d";
mirrorMissilesIndexes[] = {2, 1, 4, 3};
};

0 comments on commit bdb6c7c

Please sign in to comment.