From 9ba3b5aa6a8805c2ddcec159433dcfdceb346bc3 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Tue, 16 May 2017 21:40:07 -0500 Subject: [PATCH] Update helmet hearing protection for RHS-US (#5146) * Update helmet hearing protection for RHS-US * Hearing - Add standardized helmet protection macros * Tweak peltor vol --- addons/hearing/CfgWeapons.hpp | 28 ++-- optionals/compat_rhs_afrf3/CfgWeapons.hpp | 16 +- optionals/compat_rhs_usf3/CfgWeapons.hpp | 182 +++++++++++++++++++--- 3 files changed, 181 insertions(+), 45 deletions(-) diff --git a/addons/hearing/CfgWeapons.hpp b/addons/hearing/CfgWeapons.hpp index c063c0e896..8b138271b3 100644 --- a/addons/hearing/CfgWeapons.hpp +++ b/addons/hearing/CfgWeapons.hpp @@ -13,42 +13,42 @@ class CfgWeapons { }; }; + #define HEARING_PROTECTION_VICCREW EGVAR(hearing,protection) = 0.85; EGVAR(hearing,lowerVolume) = 0.6; + #define HEARING_PROTECTION_EARMUFF EGVAR(hearing,protection) = 0.75; EGVAR(hearing,lowerVolume) = 0.5; + #define HEARING_PROTECTION_PELTOR EGVAR(hearing,protection) = 0.75; EGVAR(hearing,lowerVolume) = 0; + class H_HelmetB; class H_HelmetCrew_B: H_HelmetB { - GVAR(protection) = 1; - GVAR(lowerVolume) = 0.80; + HEARING_PROTECTION_VICCREW }; class H_CrewHelmetHeli_B: H_HelmetB { - GVAR(protection) = 0.85; - GVAR(lowerVolume) = 0.75; + HEARING_PROTECTION_VICCREW }; class H_PilotHelmetHeli_B: H_HelmetB { - GVAR(protection) = 0.85; - GVAR(lowerVolume) = 0.75; + HEARING_PROTECTION_VICCREW }; class H_PilotHelmetFighter_B: H_HelmetB { - GVAR(protection) = 1; - GVAR(lowerVolume) = 0.80; + HEARING_PROTECTION_VICCREW }; class HelmetBase; class H_Cap_headphones: HelmetBase { - GVAR(protection) = 0.5; - GVAR(lowerVolume) = 0.60; + HEARING_PROTECTION_EARMUFF }; class H_HelmetB_light: H_HelmetB { - GVAR(protection) = 0.8; - GVAR(lowerVolume) = 0.20; + HEARING_PROTECTION_PELTOR + }; + class H_HelmetB_camo: H_HelmetB { + HEARING_PROTECTION_PELTOR }; class H_HelmetB_plain_mcamo; class H_HelmetSpecB: H_HelmetB_plain_mcamo { - GVAR(protection) = 0.8; - GVAR(lowerVolume) = 0.20; + HEARING_PROTECTION_PELTOR }; }; diff --git a/optionals/compat_rhs_afrf3/CfgWeapons.hpp b/optionals/compat_rhs_afrf3/CfgWeapons.hpp index 09a3af7384..14431a92ae 100644 --- a/optionals/compat_rhs_afrf3/CfgWeapons.hpp +++ b/optionals/compat_rhs_afrf3/CfgWeapons.hpp @@ -87,24 +87,20 @@ class CfgWeapons { ace_reloadlaunchers_enabled = 1; }; + #define HEARING_PROTECTION_VICCREW EGVAR(hearing,protection) = 0.85; EGVAR(hearing,lowerVolume) = 0.6; + #define HEARING_PROTECTION_EARMUFF EGVAR(hearing,protection) = 0.75; EGVAR(hearing,lowerVolume) = 0.5; + #define HEARING_PROTECTION_PELTOR EGVAR(hearing,protection) = 0.75; EGVAR(hearing,lowerVolume) = 0; class H_HelmetB; class rhs_tsh4: H_HelmetB { - ace_hearing_protection = 1; - ace_hearing_lowerVolume = 0.80; + HEARING_PROTECTION_VICCREW }; - class rhs_tsh4_ess: rhs_tsh4 {}; - class rhs_tsh4_bala: rhs_tsh4 {}; - class rhs_tsh4_ess_bala: rhs_tsh4 {}; class rhs_zsh7a: H_HelmetB { - ace_hearing_protection = 1; - ace_hearing_lowerVolume = 0.80; + HEARING_PROTECTION_VICCREW }; - class rhs_zsh7a_mike: rhs_zsh7a {}; class rhs_gssh18: H_HelmetB { - ace_hearing_protection = 0.5; - ace_hearing_lowerVolume = 0.60; + HEARING_PROTECTION_EARMUFF }; class rhs_weap_d81; diff --git a/optionals/compat_rhs_usf3/CfgWeapons.hpp b/optionals/compat_rhs_usf3/CfgWeapons.hpp index 2c1594143c..d67879916b 100644 --- a/optionals/compat_rhs_usf3/CfgWeapons.hpp +++ b/optionals/compat_rhs_usf3/CfgWeapons.hpp @@ -30,7 +30,7 @@ class CfgWeapons { ACE_barrelTwist = 304.8; // 1:12" ACE_barrelLength = 635.0; // 25" ACE_RailHeightAboveBore = 2.6; - }; + }; class arifle_MX_Base_F; class rhs_weap_m4_Base: arifle_MX_Base_F { ACE_barrelTwist = 177.8; @@ -195,7 +195,7 @@ class CfgWeapons { class Snip { discreteDistance[] = {100}; discreteDistanceInitIndex = 0; - }; + }; }; }; }; @@ -212,36 +212,176 @@ class CfgWeapons { lockedTargetSound[] = {"",0,1}; }; - class rhsusf_ach_helmet_ocp; - class rhsusf_opscore_01: rhsusf_ach_helmet_ocp { - ace_hearing_protection = 0.50; - ace_hearing_lowerVolume = 0.60; - }; - class rhsusf_opscore_01_tan: rhsusf_opscore_01 {}; - class rhsusf_opscore_03_ocp: rhsusf_opscore_01 {}; - class rhsusf_cvc_helmet: rhsusf_opscore_01 { - ace_hearing_protection = 1; - ace_hearing_lowerVolume = 0.80; + + #define HEARING_PROTECTION_VICCREW EGVAR(hearing,protection) = 0.85; EGVAR(hearing,lowerVolume) = 0.6; + #define HEARING_PROTECTION_EARMUFF EGVAR(hearing,protection) = 0.75; EGVAR(hearing,lowerVolume) = 0.5; + #define HEARING_PROTECTION_PELTOR EGVAR(hearing,protection) = 0.75; EGVAR(hearing,lowerVolume) = 0; + // Fast Helmets + class rhsusf_opscore_01; + class rhsusf_opscore_aor1_pelt: rhsusf_opscore_01 { + HEARING_PROTECTION_PELTOR }; - class rhsusf_cvc_green_helmet: rhsusf_cvc_helmet {}; - class rhsusf_cvc_ess: rhsusf_cvc_helmet {}; - class rhsusf_cvc_green_ess: rhsusf_cvc_ess {}; + class rhsusf_opscore_aor1_pelt_nsw: rhsusf_opscore_01 { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_opscore_bk_pelt: rhsusf_opscore_01 { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_opscore_fg_pelt: rhsusf_opscore_01 { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_opscore_fg_pelt_nsw: rhsusf_opscore_01 { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_opscore_fg_pelt_cam: rhsusf_opscore_01 { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_opscore_paint_pelt: rhsusf_opscore_01 { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_opscore_paint_pelt_nsw: rhsusf_opscore_01 { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_opscore_paint_pelt_nsw_cam: rhsusf_opscore_01 { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_opscore_aor2_pelt: rhsusf_opscore_01 { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_opscore_aor2_pelt_nsw: rhsusf_opscore_01 { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_opscore_ut_pelt: rhsusf_opscore_01 { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_opscore_ut_pelt_cam: rhsusf_opscore_01 { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_opscore_ut_pelt_nsw_cam: rhsusf_opscore_01 { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_opscore_mc_pelt: rhsusf_opscore_01 { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_opscore_mc_pelt_nsw: rhsusf_opscore_01 { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_opscore_cover; + class rhsusf_opscore_mc_cover_pelt: rhsusf_opscore_cover { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_opscore_mc_cover_pelt_cam: rhsusf_opscore_cover { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_opscore_rg_cover_pelt: rhsusf_opscore_cover { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_opscore_coy_cover_pelt: rhsusf_opscore_cover { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_opscore_mar_01; + class rhsusf_opscore_mar_ut_pelt: rhsusf_opscore_mar_01 { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_opscore_mar_fg_pelt: rhsusf_opscore_mar_01 { + HEARING_PROTECTION_PELTOR + }; + + // ACH Helmets + class rhsusf_ach_helmet_ocp; + class rhsusf_ach_bare_des_headset: rhsusf_ach_helmet_ocp { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_ach_bare_des_headset_ess: rhsusf_ach_helmet_ocp { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_ach_bare_headset: rhsusf_ach_helmet_ocp { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_ach_bare_headset_ess: rhsusf_ach_helmet_ocp { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_ach_bare_semi_headset: rhsusf_ach_helmet_ocp { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_ach_bare_semi_headset_ess: rhsusf_ach_helmet_ocp { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_ach_bare_tan_headset: rhsusf_ach_helmet_ocp { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_ach_bare_tan_headset_ess: rhsusf_ach_helmet_ocp { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_ach_bare_wood_headset: rhsusf_ach_helmet_ocp { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_ach_bare_wood_headset_ess: rhsusf_ach_helmet_ocp { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_ach_helmet_headset_ocp: rhsusf_ach_helmet_ocp { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_ach_helmet_headset_ess_ocp: rhsusf_ach_helmet_ocp { + HEARING_PROTECTION_PELTOR + }; + + // ACVC Helmets + class rhsusf_cvc_helmet: rhsusf_opscore_01 { + HEARING_PROTECTION_VICCREW + }; + + // MICH Helmets + class rhsusf_mich_bare; + class rhsusf_mich_bare_alt: rhsusf_mich_bare { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_mich_bare_norotos; + class rhsusf_mich_bare_norotos_alt: rhsusf_mich_bare_norotos { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_mich_bare_norotos_arc; + class rhsusf_mich_bare_norotos_arc_alt: rhsusf_mich_bare_norotos_arc { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_mich_bare_semi; + class rhsusf_mich_bare_alt_semi: rhsusf_mich_bare_semi { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_mich_bare_norotos_semi; + class rhsusf_mich_bare_norotos_alt_semi: rhsusf_mich_bare_norotos_semi { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_mich_bare_norotos_arc_semi; + class rhsusf_mich_bare_norotos_arc_alt_semi: rhsusf_mich_bare_norotos_arc_semi { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_mich_bare_tan; + class rhsusf_mich_bare_alt_tan: rhsusf_mich_bare_tan { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_mich_bare_norotos_tan; + class rhsusf_mich_bare_norotos_alt_tan: rhsusf_mich_bare_norotos_tan { + HEARING_PROTECTION_PELTOR + }; + class rhsusf_mich_bare_norotos_arc_tan; + class rhsusf_mich_bare_norotos_arc_alt_tan: rhsusf_mich_bare_norotos_arc_tan { + HEARING_PROTECTION_PELTOR + }; + class H_PilotHelmetHeli_B; class H_CrewHelmetHeli_B; class rhsusf_hgu56p: H_PilotHelmetHeli_B { - ace_hearing_protection = 0.85; - ace_hearing_lowerVolume = 0.75; + HEARING_PROTECTION_VICCREW }; class rhsusf_hgu56p_mask: H_CrewHelmetHeli_B { - ace_hearing_protection = 0.85; - ace_hearing_lowerVolume = 0.75; + HEARING_PROTECTION_VICCREW }; class H_HelmetB; class RHS_jetpilot_usaf: H_HelmetB { - ace_hearing_protection = 1; - ace_hearing_lowerVolume = 0.80; + HEARING_PROTECTION_VICCREW }; };