diff --git a/addons/vehicles/CfgActions.hpp b/addons/vehicles/CfgActions.hpp deleted file mode 100644 index a15b9e9a185..00000000000 --- a/addons/vehicles/CfgActions.hpp +++ /dev/null @@ -1,7 +0,0 @@ -class CfgActions { - class None; - class Eject: None { - show = QUOTE(call compile getText (configFile >> 'CfgActions' >> 'Eject' >> 'GVAR(setting)')); - GVAR(setting) = QUOTE(profileNamespace getVariable [ARR_2('GVAR(showEjectAction)',0)]); - }; -}; diff --git a/addons/vehicles/config.cpp b/addons/vehicles/config.cpp index 9ec0d73aef7..9b0d595fc84 100644 --- a/addons/vehicles/config.cpp +++ b/addons/vehicles/config.cpp @@ -21,4 +21,3 @@ class CfgPatches { #include "CfgAmmo.hpp" #include "CfgVehicles.hpp" #include "CfgWeapons.hpp" -#include "CfgActions.hpp" diff --git a/addons/vehicles/initSettings.inc.sqf b/addons/vehicles/initSettings.inc.sqf index eb15ea346fd..6ab183a15fa 100644 --- a/addons/vehicles/initSettings.inc.sqf +++ b/addons/vehicles/initSettings.inc.sqf @@ -14,10 +14,14 @@ ELSTRING(common,ACEKeybindCategoryVehicles), true, 2, { - profileNamespace setVariable [QGVAR(showEjectAction), parseNumber !_this]; - saveProfileNamespace; + #define ACTION_ENUM_EJECT 51 + if (isNil "CBA_fnc_hideAction") then { + hideActions [_this, [ACTION_ENUM_EJECT]]; + } else { + [ACTION_ENUM_EJECT, QUOTE(ADDON), _this] call CBA_fnc_hideAction; + }; }, - true // needs restart + true // needs restart (for ace_aircraft's initEjectAction text color) ] call CBA_fnc_addSetting; [