mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Regex used: \[(.+?),(.+?),(.+?)\]\s+call\s+E?FUNC\((common,)?(target|object)Event\) [$1,$3,$2] call CBA_fnc_targetEvent E?FUNC\((common,)?(server|global|local)Event\) CBA_fnc_$2Event E?FUNC\((common,)?(add|remove)EventHandler\) CBA_fnc_$2EventHandler
22 lines
622 B
Plaintext
22 lines
622 B
Plaintext
/*
|
|
* 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
|
|
*
|
|
* Public: No
|
|
*/
|
|
#include "script_component.hpp"
|
|
|
|
params ["_unit"];
|
|
|
|
// setVariable is broken on JIP after respawn
|
|
_unit setVariable [QGVAR(muteUnitReasons), _unit getVariable [QGVAR(muteUnitReasons), []], true];
|
|
|
|
// fix mp issues with respawning and the speaker
|
|
["setSpeaker", [_unit, speaker _unit]] call CBA_fnc_globalEvent;
|