Skip to content

Commit 9010fe5

Browse files
Hearing - Tweak EHP effects, add 🦆ing setting (#10686)
Tweak EHP effects, add setting
1 parent c702a18 commit 9010fe5

File tree

5 files changed

+21
-4
lines changed

5 files changed

+21
-4
lines changed

addons/hearing/functions/fnc_earRinging.sqf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ TRACE_2("adding",_strength * GVAR(damageCoefficent),GVAR(deafnessDV));
2626
// Handle volume reduction by electronic hearing protection
2727
if (
2828
_strength >= EHP_MIN_STRENGTH
29+
&& GVAR(enableNoiseDucking)
2930
&& {ACE_player getVariable ["ACE_hasEHP", false] || {ACE_player getVariable ["ACE_hasBuiltInEHP", false]}}
3031
) then {
3132
if (GVAR(ehpTimeout) == -1) then {

addons/hearing/functions/fnc_removeEHP.sqf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ if !([_unit, "ACE_EHP"] call CBA_fnc_canAddItem) exitWith {
2525
[LELSTRING(common,Inventory_Full)] call EFUNC(common,displayTextStructured);
2626
};
2727

28-
// Plugs already in and removing them.
28+
// EHP already in and removing them.
2929
_unit addItem "ACE_EHP";
3030

3131
_unit setVariable ["ACE_hasEHP", false, true];

addons/hearing/initSettings.inc.sqf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,11 @@ private _category = format ["ACE %1", LLSTRING(Module_DisplayName)];
6363
[[0, 1, 2], [ELSTRING(common,Disabled), LSTRING(heavyWeaponUnits), ELSTRING(common,Enabled)], 1],
6464
1
6565
] call CBA_fnc_addSetting;
66+
67+
[
68+
QGVAR(enableNoiseDucking),
69+
"CHECKBOX",
70+
[LSTRING(EnableNoiseDucking_DisplayName), LSTRING(EnableNoiseDucking_Description)],
71+
_category,
72+
true
73+
] call CBA_fnc_addSetting;

addons/hearing/script_component.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
#define UPDATE_HEARING -1
2121

2222
// Electronic hearing protection FX
23-
#define EHP_REDUCTION 0.125
23+
#define EHP_REDUCTION 0.3
2424
#define EHP_MIN_STRENGTH 0.07
25-
#define EHP_TIMEOUT 0.7
26-
#define EHP_FADE_IN 0.1
25+
#define EHP_TIMEOUT 0.6
26+
#define EHP_FADE_IN 0.25
2727

2828
// Vehicle explosion hearing damage
2929
#define VEHICLE_EXPLOSION_STRENGTH 200

addons/hearing/stringtable.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,5 +487,13 @@
487487
<Chinese>昏迷時音量</Chinese>
488488
<Chinesesimp>无意识时音量</Chinesesimp>
489489
</Key>
490+
<Key ID="STR_ACE_Hearing_EnableNoiseDucking_Description">
491+
<English>Reduces volume of impulse noises like shots and explosions when wearing electronic hearing protection</English>
492+
<German>Blendet Impulsgeräusche wie Schüsse oder Explosionen beim Tragen von elektronischem Gehörschutz aus</German>
493+
</Key>
494+
<Key ID="STR_ACE_Hearing_EnableNoiseDucking_DisplayName">
495+
<English>Enable Noise Ducking Effect</English>
496+
<German>Aktiviere Geräuschunterdrückungseffekt</German>
497+
</Key>
490498
</Package>
491499
</Project>

0 commit comments

Comments
 (0)