mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Done I think
This commit is contained in:
parent
d3f5304f62
commit
cb9b38bca2
@ -1,6 +1,6 @@
|
||||
class Extended_PostInit_EventHandlers {
|
||||
class ADDON {
|
||||
clientInit = "QUOTE(call COMPILE_FILE(XEH_post_initClient));
|
||||
serverInit = "QUOTE(call COMPILE_FILE(XEH_post_initServer));
|
||||
clientInit = QUOTE(call COMPILE_FILE(XEH_post_initClient));
|
||||
serverInit = QUOTE(call COMPILE_FILE(XEH_post_initServer));
|
||||
};
|
||||
};
|
@ -2,19 +2,24 @@
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
0 spawn {
|
||||
waitUntil {!isNull AGM_player};
|
||||
_setupPlayer = {
|
||||
if (!isNull ACE_player) then {
|
||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
||||
|
||||
[AGM_player] call AGM_Core_fnc_muteUnit;
|
||||
AGM_player setVariable [QGVAR(isMuted), true, true];
|
||||
[ACE_player] call EFUNC(common,muteUnit);
|
||||
ACE_player setVariable [QGVAR(isMuted), true, true];
|
||||
};
|
||||
};
|
||||
|
||||
[_setupPlayer, 0, []] call CBA_fnc_addPerFrameHandler;
|
||||
|
||||
[missionNamespace, "playerChanged", {
|
||||
[_this select 0] call AGM_Core_fnc_muteUnit;
|
||||
//On player change, mute old unit and unmute new player
|
||||
[_this select 0] call EFUNC(common,muteUnit);
|
||||
(_this select 0) setVariable [QGVAR(isMuted), true, true];
|
||||
|
||||
if (!((_this select 1) getVariable ["AGM_isUnconscious", false]) && {alive (_this select 1)}) then {
|
||||
[_this select 1] call AGM_Core_fnc_unmuteUnit;
|
||||
if (!((_this select 1) getVariable ["ACE_isUnconscious", false]) && {alive (_this select 1)}) then { //@todo: ACE_isUnconscious???
|
||||
[_this select 1] call EFUNC(common,unMuteUnit);
|
||||
};
|
||||
(_this select 1) setVariable [QGVAR(isMuted), false, true];
|
||||
}] call AGM_Core_fnc_addCustomEventHandler;
|
||||
}] call EFUNC(common,addCustomEventHandler);
|
||||
|
Loading…
Reference in New Issue
Block a user