This commit is contained in:
PabstMirror 2015-01-13 21:17:34 -06:00
parent 341fb7b86f
commit d3f5304f62
4 changed files with 18 additions and 17 deletions

View File

@ -1,2 +1,3 @@
#include "script_component.hpp"
NO_DEDICATED;

View File

@ -1,6 +1,6 @@
class Extended_PostInit_EventHandlers {
class ADDON {
clientInit = "call compile preprocessFileLineNumbers '\AGM_NoRadio\clientInit.sqf'";
serverInit = "call compile preprocessFileLineNumbers '\AGM_NoRadio\serverInit.sqf'";
clientInit = "QUOTE(call COMPILE_FILE(XEH_post_initClient));
serverInit = "QUOTE(call COMPILE_FILE(XEH_post_initServer));
};
};

View File

@ -6,15 +6,15 @@
waitUntil {!isNull AGM_player};
[AGM_player] call AGM_Core_fnc_muteUnit;
AGM_player setVariable ["AGM_NoRadio_isMuted", true, true];
AGM_player setVariable [QGVAR(isMuted), true, true];
};
[missionNamespace, "playerChanged", {
[_this select 0] call AGM_Core_fnc_muteUnit;
(_this select 0) setVariable ["AGM_NoRadio_isMuted", true, true];
(_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;
};
(_this select 1) setVariable ["AGM_NoRadio_isMuted", false, true];
(_this select 1) setVariable [QGVAR(isMuted), false, true];
}] call AGM_Core_fnc_addCustomEventHandler;

View File

@ -3,8 +3,8 @@
#include "script_component.hpp"
addMissionEventHandler ["HandleDisconnect", {
if !((_this select 0) getVariable ["AGM_isUnconscious", false]) then {
_this call AGM_Core_fnc_unmuteUnit;
if !((_this select 0) getVariable ["ACE_isUnconscious", false]) then { //@ToDo: ai waking up will be silent?
_this call EFUNC(common,unMuteUnit);
};
(_this select 0) setVariable ["AGM_NoRadio_isMuted", false, true];
(_this select 0) setVariable [QGVAR(isMuted), false, true];
}];