diff --git a/addons/hearing/CfgSounds.hpp b/addons/hearing/CfgSounds.hpp index 8c6d6965df..c09c112149 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)),2,1}; + sound[] = {QUOTE(PATHTOF(sounds\deafness.ogg)),1,1}; titles[] = {}; }; class ACE_Ring_Backblast { diff --git a/addons/hearing/functions/fnc_earRinging.sqf b/addons/hearing/functions/fnc_earRinging.sqf index 58e8bc4b7a..96482f5b79 100644 --- a/addons/hearing/functions/fnc_earRinging.sqf +++ b/addons/hearing/functions/fnc_earRinging.sqf @@ -53,7 +53,6 @@ GVAR(earRingingPFH) = [{ GVAR(beep2) = false; }; if (!GVAR(beep2)) then { - systemChat format["Deafness %1", ((_unit getvariable [QGVAR(dv), 0]) - (_unit getvariable [QGVAR(prior), 0]))]; playSound "ACE_Combat_Deafness"; GVAR(beep2) = true; GVAR(time3) = ACE_time + 5; diff --git a/addons/hearing/functions/fnc_firedNear.sqf b/addons/hearing/functions/fnc_firedNear.sqf index 56d4214838..018ec4f66f 100644 --- a/addons/hearing/functions/fnc_firedNear.sqf +++ b/addons/hearing/functions/fnc_firedNear.sqf @@ -21,7 +21,7 @@ */ #include "script_component.hpp" -private ["_silencer", "_audibleFireCoef", "_audibleFire", "_loudness", "_strength", "_vehAttenuation"]; +private ["_silencer", "_audibleFireCoef", "_loudness", "_strength", "_vehAttenuation", "_magazine", "_initSpeed", "_ammoConfig", "_caliber", "_parentClasses"]; PARAMS_7(_object,_firer,_distance,_weapon,_muzzle,_mode,_ammo); @@ -49,8 +49,14 @@ if (_silencer != "") then { _magazine = (getArray(configFile >> "CfgWeapons" >> _weapon >> "magazines")) select 0; _initSpeed = getNumber(configFile >> "CfgMagazines" >> _magazine >> "initSpeed"); -_caliber = getNumber(configFile >> "CfgAmmo" >> _ammo >> "ACE_caliber"); -if (_caliber <= 0) then { _caliber = 6.5; }; +_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; }; +}; _loudness = (_caliber ^ 1.25 / 10) * (_initspeed / 1000) * _audibleFireCoef / 5; _strength = _vehAttenuation * (_loudness - (_loudness / 50 * _distance)); // linear drop off