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>
This commit is contained in:
prisonerMO 2024-03-12 23:33:08 +02:00 committed by GitHub
parent 0dabc678f6
commit 5e1771aecd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 13 additions and 6 deletions

View File

@ -1,7 +1,5 @@
#include "script_component.hpp"
#include "initKeybinds.inc.sqf"
GVAR(currentbulletID) = -1;
GVAR(Protractor) = false;
@ -11,6 +9,8 @@ GVAR(currentGrid) = 0;
if (!hasInterface) exitWith {};
#include "initKeybinds.inc.sqf"
["CBA_settingsInitialized", {
//If not enabled, dont't add PFEH
if (!GVAR(enabled)) exitWith {};

View File

@ -1,5 +1,7 @@
#include "script_component.hpp"
if (!hasInterface) exitWith {};
#include "initKeybinds.inc.sqf"
GVAR(active) = false;

View File

@ -57,6 +57,8 @@ if (isServer) then {
if (!hasInterface) exitWith {};
#include "initKeybinds.inc.sqf"
GVAR(PlacedCount) = 0;
GVAR(Setup) = objNull;
GVAR(pfeh_running) = false;

View File

@ -8,7 +8,6 @@ PREP_RECOMPILE_START;
#include "XEH_PREP.hpp"
PREP_RECOMPILE_END;
#include "initKeybinds.inc.sqf"
#include "initSettings.inc.sqf"
GVAR(activeTrigger) = "";

View File

@ -1,6 +1,7 @@
#include "script_component.hpp"
if (hasInterface) then {
#include "initKeybinds.inc.sqf"
["ace_infoDisplayChanged", FUNC(turretDisplayLoaded)] call CBA_fnc_addEventHandler;
};

View File

@ -7,6 +7,5 @@ PREP_RECOMPILE_START;
PREP_RECOMPILE_END;
#include "initSettings.inc.sqf"
#include "initKeybinds.inc.sqf"
ADDON = true;

View File

@ -1,7 +1,5 @@
#include "script_component.hpp"
#include "initKeybinds.inc.sqf"
GVAR(RangeCardOpened) = false;
GVAR(controls) = [];
@ -17,3 +15,7 @@ GVAR(boreHeightCopy) = 3.81;
GVAR(ammoClassCopy) = "";//"ACE_762x51_Ball_M118LR";
GVAR(magazineClassCopy) = "";//"ACE_20Rnd_762x51_M118LR_Mag";
GVAR(weaponClassCopy) = "";//srifle_DMR_06_olive_F";
if (!hasInterface) exitWith {};
#include "initKeybinds.inc.sqf"

View File

@ -1,5 +1,7 @@
#include "script_component.hpp"
if (!hasInterface) exitWith {};
#include "initKeybinds.inc.sqf"
GVAR(active) = false;