Hearing - Use class EH instead of extended EH (#9986)

Use class EH instead of extended EH
This commit is contained in:
johnb432 2024-04-28 18:02:50 +02:00 committed by GitHub
parent 60b87f0b41
commit 3b806295f7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 9 deletions

View File

@ -13,15 +13,7 @@ class Extended_PreInit_EventHandlers {
class Extended_PostInit_EventHandlers { class Extended_PostInit_EventHandlers {
class ADDON { class ADDON {
clientinit = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); init = QUOTE(call COMPILE_SCRIPT(XEH_postInit));
};
};
class Extended_Init_EventHandlers {
class CAManBase {
class GVAR(AddEarPlugs) {
serverInit = QUOTE(_this call FUNC(addEarPlugs));
};
}; };
}; };

View File

@ -1,5 +1,15 @@
#include "script_component.hpp" #include "script_component.hpp"
if (isServer) then {
["CBA_settingsInitialized", {
TRACE_1("settingInit - server",GVAR(EnableCombatDeafness));
// Only install event handler if combat deafness is enabled
if (!GVAR(EnableCombatDeafness)) exitWith {};
["CAManBase", "Init", LINKFUNC(addEarPlugs), true, [], true] call CBA_fnc_addClassEventHandler;
}] call CBA_fnc_addEventHandler;
};
if (!hasInterface) exitWith {}; if (!hasInterface) exitWith {};
#include "initKeybinds.inc.sqf" #include "initKeybinds.inc.sqf"