mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
mute implementation in noradio, handle post init on remote units
This commit is contained in:
@ -26,6 +26,9 @@ class Extended_InitPost_EventHandlers {
|
||||
class GVAR(forceWalk) {
|
||||
init = QUOTE(if (local (_this select 0)) then {_this call FUNC(applyForceWalkStatus);};);
|
||||
};
|
||||
class GVAR(muteUnit) {
|
||||
init = QUOTE(_this call FUNC(muteUnitHandleInitPost));
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -124,6 +124,7 @@ PREP(moduleCheckPBOs);
|
||||
PREP(moduleLSDVehicles);
|
||||
PREP(moveToTempGroup);
|
||||
PREP(muteUnit);
|
||||
PREP(muteUnitHandleInitPost);
|
||||
PREP(muteUnitHandleRespawn);
|
||||
PREP(numberToDigits);
|
||||
PREP(numberToDigitsString);
|
||||
|
@ -33,6 +33,6 @@ _speaker = speaker _unit;
|
||||
|
||||
if (_speaker == "ACE_NoVoice") exitWith {};
|
||||
|
||||
["setSpeaker", _unit, [_unit, "ACE_NoVoice"]] call FUNC(targetEvent);
|
||||
["setSpeaker", [_unit, "ACE_NoVoice"]] call FUNC(globalEvent);
|
||||
|
||||
_unit setVariable ["ACE_OriginalSpeaker", _speaker, true];
|
||||
|
11
addons/common/functions/fnc_muteUnitHandleInitPost.sqf
Normal file
11
addons/common/functions/fnc_muteUnitHandleInitPost.sqf
Normal file
@ -0,0 +1,11 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
private "_unit";
|
||||
|
||||
_unit = _this select 0;
|
||||
|
||||
// setSpeaker gets overwritten after init on remote units; if unit is muted, setSpeaker again
|
||||
if (count (_unit getVariable [QGVAR(muteUnitReasons), []]) > 0) then {
|
||||
["setSpeaker", [_unit, "ACE_NoVoice"]] call FUNC(localEvent);
|
||||
};
|
Reference in New Issue
Block a user