ACE3/addons/common/functions/fnc_muteUnitHandleInitPost.sqf
2015-09-18 21:46:21 +02:00

21 lines
477 B
Plaintext

/*
* 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"
params ["_unit"];
// setSpeaker gets overwritten after init on remote units; if unit is muted, setSpeaker again
if (count (_unit getVariable [QGVAR(muteUnitReasons), []]) > 0) then {
["setSpeaker", [_unit, "ACE_NoVoice"]] call FUNC(localEvent);
};