From 7a7e930024499a071bb3566d7de74eec3a040ca9 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sun, 15 May 2016 19:38:37 +0200 Subject: [PATCH] Add deprecate sitting component --- addons/sitting/CfgVehicles.hpp | 2 +- addons/sitting/XEH_clientInit.sqf | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/addons/sitting/CfgVehicles.hpp b/addons/sitting/CfgVehicles.hpp index d92d92fc49..f7b1c9c197 100644 --- a/addons/sitting/CfgVehicles.hpp +++ b/addons/sitting/CfgVehicles.hpp @@ -8,7 +8,7 @@ class CfgVehicles { category = "ACE"; displayName = CSTRING(ModuleDisplayName); function = QFUNC(moduleInit); - scope = 2; + scope = 1; isGlobal = 1; isSingular = 1; icon = QUOTE(PATHTOF(UI\Icon_Module_Sitting_ca.paa)); diff --git a/addons/sitting/XEH_clientInit.sqf b/addons/sitting/XEH_clientInit.sqf index e15017d715..f681a3df8d 100644 --- a/addons/sitting/XEH_clientInit.sqf +++ b/addons/sitting/XEH_clientInit.sqf @@ -3,11 +3,12 @@ // Exit on Headless if (!hasInterface) exitWith {}; +GVAR(isEnabled) = false; ["SettingsInitialized", { - TRACE_1("SettingInit", GVAR(enable)); - + if ([[QUOTE(ADDON), QGVAR(enable)], ["acex_sitting", "acex_sitting_enable"], "3.7.0"] call EFUNC(common,deprecateComponent)) exitwith {}; //If not enabled, then do not add CanInteractWith Condition or event handlers: - if (!GVAR(enable)) exitWith {}; + if (!GVAR(enable) || GVAR(isEnabled)) exitWith {}; + GVAR(isEnabled) = true; // Add interaction menu exception ["isNotSitting", {isNil {(_this select 0) getVariable QGVAR(isSitting)}}] call EFUNC(common,addCanInteractWithCondition);