diff --git a/addons/arsenal/functions/fnc_onArsenalClose.sqf b/addons/arsenal/functions/fnc_onArsenalClose.sqf index a17159de68..821ce687af 100644 --- a/addons/arsenal/functions/fnc_onArsenalClose.sqf +++ b/addons/arsenal/functions/fnc_onArsenalClose.sqf @@ -11,6 +11,12 @@ deleteVehicle GVAR(cameraHelper); if (is3DEN) then { + private _centerOriginParent = objectParent GVAR(centerOrigin); + + if !(isNull _centerOriginParent) then { + _centerOriginParent hideObject false; + }; + GVAR(centerOrigin) hideObject false; // Apply the loadout from the dummy to all selected units diff --git a/addons/arsenal/functions/fnc_onArsenalOpen.sqf b/addons/arsenal/functions/fnc_onArsenalOpen.sqf index b1f916d07a..692b72edba 100644 --- a/addons/arsenal/functions/fnc_onArsenalOpen.sqf +++ b/addons/arsenal/functions/fnc_onArsenalOpen.sqf @@ -281,6 +281,12 @@ if (is3DEN) then { GVAR(centerOrigin) = GVAR(center); GVAR(centerOrigin) hideObject true; + + private _centerOriginParent = objectParent GVAR(centerOrigin); + if !(isNull _centerOriginParent) then { + _centerOriginParent hideObject true; + }; + private _centerPos = position GVAR(centerOrigin); GVAR(center) = createAgent [typeOf GVAR(centerOrigin), position GVAR(centerOrigin), [], 0, "none"]; diff --git a/addons/arsenal/functions/fnc_open3DEN.sqf b/addons/arsenal/functions/fnc_open3DEN.sqf index 88229cf790..6bb0adcaa3 100644 --- a/addons/arsenal/functions/fnc_open3DEN.sqf +++ b/addons/arsenal/functions/fnc_open3DEN.sqf @@ -1,3 +1,16 @@ +/* + * Author: Alganthe + * Replace the 3DEN "edit loadout" menu action + * + * Arguments: + * None + * + * Return Value: + * None + * + * + * Public: No +*/ #include "script_component.hpp" private _entity = (uinamespace getvariable ["bis_fnc_3DENEntityMenu_data",[]]) param [1, objnull]; diff --git a/addons/arsenal/functions/fnc_openBox.sqf b/addons/arsenal/functions/fnc_openBox.sqf index 8bd3e4f372..09a33c4a8e 100644 --- a/addons/arsenal/functions/fnc_openBox.sqf +++ b/addons/arsenal/functions/fnc_openBox.sqf @@ -20,11 +20,11 @@ params [["_object", objNull, [objNull]], ["_center", objNull, [objNull]], ["_mode", false, [false]]]; if ( - isNull _object || - {isNull _center} || - {!(_center isKindOf "Man")} || - {!(isNull objectParent _center)} - ) exitWith {}; + isNull _object || + {isNull _center} || + {!(_center isKindOf "Man")} || + {!(isNull objectParent _center) && {!is3DEN}} +) exitWith {}; if (isNil {_object getVariable [QGVAR(virtualItems), nil]} && {!_mode}) exitWith { [localize LSTRING(noVirtualItems), false, 5, 1] call EFUNC(common,displayText);