diff --git a/addons/hearing/CfgSounds.hpp b/addons/hearing/CfgSounds.hpp index c09c112149..8c6d6965df 100644 --- a/addons/hearing/CfgSounds.hpp +++ b/addons/hearing/CfgSounds.hpp @@ -12,7 +12,7 @@ class CfgSounds { titles[] = {}; }; class ACE_Combat_Deafness { - sound[] = {QUOTE(PATHTOF(sounds\deafness.ogg)),1,1}; + sound[] = {QUOTE(PATHTOF(sounds\deafness.ogg)),2,1}; titles[] = {}; }; class ACE_Ring_Backblast { diff --git a/addons/hearing/functions/fnc_firedNear.sqf b/addons/hearing/functions/fnc_firedNear.sqf index 018ec4f66f..d62fe17892 100644 --- a/addons/hearing/functions/fnc_firedNear.sqf +++ b/addons/hearing/functions/fnc_firedNear.sqf @@ -50,16 +50,22 @@ if (_silencer != "") then { _magazine = (getArray(configFile >> "CfgWeapons" >> _weapon >> "magazines")) select 0; _initSpeed = getNumber(configFile >> "CfgMagazines" >> _magazine >> "initSpeed"); _ammoConfig = (configFile >> "CfgAmmo" >> _ammo); -_caliber = getNumber(_ammoConfig >> "ACE_caliber"); _parentClasses = [_ammoConfig, true] call BIS_fnc_returnParents; -if ("RocketBase" in _parentClasses || "MissileBase" in _parentClasses) then { - _caliber = 200; -} else { - if (_caliber <= 0) then { _caliber = 6.5; }; +_caliber = getNumber(_ammoConfig >> "ACE_caliber"); +_caliber = switch (true) do { + case ("ShellBase" in _parentClasses): { 80 }; + case ("RocketBase" in _parentClasses): { 200 }; + case ("MissileBase" in _parentClasses): { 600 }; + case ("SubmunitionBase" in _parentClasses): { 80 }; + default { + if (_caliber <= 0) then { 6.5 } else { _caliber }; + }; }; _loudness = (_caliber ^ 1.25 / 10) * (_initspeed / 1000) * _audibleFireCoef / 5; _strength = _vehAttenuation * (_loudness - (_loudness / 50 * _distance)); // linear drop off +//systemChat format["%1 : %2 : %3", _strength, _initSpeed, _parentClasses]; + if (_strength < 0.01) exitWith {}; [{_this call FUNC(earRinging)}, [ACE_player, _strength], 0.2, 0] call EFUNC(common,waitAndExecute);