ACE3/addons/common/functions/fnc_muteUnitHandleInitPost.sqf

21 lines
483 B
Plaintext
Raw Normal View History

2015-09-18 19:46:21 +00:00
/*
* Author: commy2
* Applies speaker changes on init post. Used because setSpeaker is broken on init.
*
* Arguments:
* 0: unit <OBJECT>
*
* Return Value:
* None
*
* Public: No
*/
#include "script_component.hpp"
2015-09-18 19:46:21 +00:00
params ["_unit"];
// setSpeaker gets overwritten after init on remote units; if unit is muted, setSpeaker again
if (count (_unit getVariable [QGVAR(muteUnitReasons), []]) > 0) then {
2016-05-24 13:13:11 +00:00
["ace_setSpeaker", [_unit, "ACE_NoVoice"]] call CBA_fnc_localEvent;
};