ACE3/addons/mk6mortar/XEH_postInit.sqf
prisonerMO 5e1771aecd
General - Don't add keybinds to headless client/dedicated server (#9842)
* Do not need to register keybinds on machines that don't have interfaces.

* add newline

---------

Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
2024-03-12 14:33:08 -07:00

18 lines
745 B
Plaintext

#include "script_component.hpp"
if (hasInterface) then {
#include "initKeybinds.inc.sqf"
["ace_infoDisplayChanged", FUNC(turretDisplayLoaded)] call CBA_fnc_addEventHandler;
};
["CBA_settingsInitialized", {
TRACE_4("CBA_settingsInitialized",GVAR(airResistanceEnabled),GVAR(allowComputerRangefinder),GVAR(allowCompass),GVAR(useAmmoHandling));
["vehicle", FUNC(handlePlayerVehicleChanged), true] call CBA_fnc_addPlayerEventHandler;
if (!GVAR(airResistanceEnabled)) exitWith {};
if (EGVAR(artillerytables,advancedCorrections)) exitWith { TRACE_1("defer firedEH to artillerytables",_this); };
["Mortar_01_base_F", "fired", {call FUNC(handleFired)}] call CBA_fnc_addClassEventHandler;
}] call CBA_fnc_addEventHandler;