From be61424fed5798d1d592bca06e0868500d3aa9d9 Mon Sep 17 00:00:00 2001 From: johnb432 <58661205+johnb432@users.noreply.github.com> Date: Wed, 29 May 2024 17:40:32 +0200 Subject: [PATCH] Hearing - Fix volume being force updated when loadouts are set on AI (#10044) * Update XEH_preInit.sqf * Update XEH_preInit.sqf --- addons/hearing/XEH_preInit.sqf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/hearing/XEH_preInit.sqf b/addons/hearing/XEH_preInit.sqf index 7a6195ec46..7a4ba739c1 100644 --- a/addons/hearing/XEH_preInit.sqf +++ b/addons/hearing/XEH_preInit.sqf @@ -13,7 +13,10 @@ PREP_RECOMPILE_END; if (_extendedInfo getOrDefault ["ace_earplugs", false]) then { _unit setVariable ["ACE_hasEarPlugsIn", true, true]; - [QGVAR(updateVolume), [[true]], _unit] call CBA_fnc_targetEvent; + // Only force update volume if unit is a player (including remote controlled) + if (_unit call EFUNC(common,isPlayer)) then { + [QGVAR(updateVolume), [[true]], _unit] call CBA_fnc_targetEvent; + }; }; }] call CBA_fnc_addEventHandler;