Hearing - Fix volume being force updated when loadouts are set on AI (#10044)

* Update XEH_preInit.sqf

* Update XEH_preInit.sqf
This commit is contained in:
johnb432 2024-05-29 17:40:32 +02:00 committed by GitHub
parent be9797d11d
commit be61424fed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -13,7 +13,10 @@ PREP_RECOMPILE_END;
if (_extendedInfo getOrDefault ["ace_earplugs", false]) then { if (_extendedInfo getOrDefault ["ace_earplugs", false]) then {
_unit setVariable ["ACE_hasEarPlugsIn", true, true]; _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; }] call CBA_fnc_addEventHandler;