2018-09-17 19:19:29 +00:00
|
|
|
#include "script_component.hpp"
|
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
|
|
|
|
*
|
2017-06-08 13:31:51 +00:00
|
|
|
* Example:
|
|
|
|
* [bob] call ace_common_fnc_muteUnitHandleInitPost
|
|
|
|
*
|
2015-09-18 19:46:21 +00:00
|
|
|
* Public: No
|
|
|
|
*/
|
2015-04-12 09:17:58 +00:00
|
|
|
|
2015-09-18 19:46:21 +00:00
|
|
|
params ["_unit"];
|
2015-04-12 09:17:58 +00:00
|
|
|
|
|
|
|
// setSpeaker gets overwritten after init on remote units; if unit is muted, setSpeaker again
|
|
|
|
if (count (_unit getVariable [QGVAR(muteUnitReasons), []]) > 0) then {
|
2016-06-04 10:12:56 +00:00
|
|
|
[QGVAR(setSpeaker), [_unit, "ACE_NoVoice"]] call CBA_fnc_localEvent;
|
2015-04-12 09:17:58 +00:00
|
|
|
};
|