From cf1910eb793b8474f32d71236348bacb7c963a30 Mon Sep 17 00:00:00 2001 From: Jo David Date: Fri, 28 Dec 2018 14:46:13 +0100 Subject: [PATCH] Changed: Remove ear ringing from flashbang explosions when wearing protective gear (e.g. ComTacs) (#6746) * Remove ear ringing from flashbangs when wearing protective gear, reduce strength by damageCoefficent --- addons/grenades/functions/fnc_flashbangExplosionEH.sqf | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/addons/grenades/functions/fnc_flashbangExplosionEH.sqf b/addons/grenades/functions/fnc_flashbangExplosionEH.sqf index 37e9a10845..86312651eb 100644 --- a/addons/grenades/functions/fnc_flashbangExplosionEH.sqf +++ b/addons/grenades/functions/fnc_flashbangExplosionEH.sqf @@ -92,8 +92,10 @@ if (hasInterface && {!isNull ACE_player} && {alive ACE_player}) then { _strength = _strength * _losCoefficient; // Add ace_hearing ear ringing sound effect - if (isClass (configFile >> "CfgPatches" >> "ACE_Hearing") && {_strength > 0}) then { - [40 * _strength] call EFUNC(hearing,earRinging); + if (isClass (configFile >> "CfgPatches" >> "ACE_Hearing") && {_strength > 0 && {EGVAR(hearing,damageCoefficent) > 0.25}}) then { + private _earringingStrength = 40 * _strength * EGVAR(hearing,damageCoefficent); + [_earringingStrength] call EFUNC(hearing,earRinging); + TRACE_1("Earringing Strength",_earringingStrength); }; // add ace_medical pain effect: