2023-09-12 18:58:10 +00:00
#include "..\script_component.hpp"
2015-09-18 19:46:21 +00:00
/*
* Author: commy2
* Applies speaker changes on respawn. Used because speaker is respawning breaks the speaker on non-local clients. Also resets the public object variable (broken for JIP clients, that join after respawn)
*
* Arguments:
* 0: unit <OBJECT>
*
* Return Value:
* None
*
2017-06-08 13:31:51 +00:00
* Example:
* [bob] call ace_common_fnc_muteUnitHandleRespawn
*
2015-09-18 19:46:21 +00:00
* Public: No
*/
2015-04-12 08:05:49 +00:00
2015-09-18 19:46:21 +00:00
params ["_unit"];
2015-04-12 08:05:49 +00:00
// setVariable is broken on JIP after respawn
_unit setVariable [QGVAR(muteUnitReasons), _unit getVariable [QGVAR(muteUnitReasons), []], true];
// fix mp issues with respawning and the speaker
2016-06-04 10:12:56 +00:00
[QGVAR(setSpeaker), [_unit, speaker _unit]] call CBA_fnc_globalEvent;