diff --git a/addons/arsenal/functions/fnc_onArsenalClose.sqf b/addons/arsenal/functions/fnc_onArsenalClose.sqf index 821ce687af..eddd062e5f 100644 --- a/addons/arsenal/functions/fnc_onArsenalClose.sqf +++ b/addons/arsenal/functions/fnc_onArsenalClose.sqf @@ -37,6 +37,13 @@ if (is3DEN) then { get3DENCamera cameraEffect ["internal","back"]; ["ShowInterface",true] call bis_fnc_3DENInterface; GVAR(visionMode) call bis_fnc_3DENVisionMode; +} else { + // Select correct weapon + switch GVAR(selectedWeaponType) do { + case 0: {GVAR(center) selectWeapon primaryWeapon GVAR(center);}; + case 1: {GVAR(center) selectWeapon secondaryWeapon GVAR(center);}; + case 2: {GVAR(center) selectWeapon handgunWeapon GVAR(center);}; + }; }; if (isMultiplayer) then { @@ -48,13 +55,6 @@ if (isMultiplayer) then { [QGVAR(center) + "_voice", GVAR(center)] call CBA_fnc_removeGlobalEventJIP; }; -// Select correct weapon -switch GVAR(selectedWeaponType) do { - case 0: {GVAR(center) selectWeapon primaryWeapon GVAR(center);}; - case 1: {GVAR(center) selectWeapon secondaryWeapon GVAR(center);}; - case 2: {GVAR(center) selectWeapon handgunWeapon GVAR(center);}; -}; - if !(isnull curatorCamera) then { curatorcamera setPosAtl (_cameraData select 0); curatorcamera setVectorDir (_cameraData select 1); diff --git a/addons/arsenal/functions/fnc_onArsenalOpen.sqf b/addons/arsenal/functions/fnc_onArsenalOpen.sqf index 692b72edba..f15f68c3e6 100644 --- a/addons/arsenal/functions/fnc_onArsenalOpen.sqf +++ b/addons/arsenal/functions/fnc_onArsenalOpen.sqf @@ -248,23 +248,6 @@ _mouseBlockCtrl ctrlEnable false; IDC_rightSearchbar ]; -//--------------- Prepare the left panel -GVAR(currentLeftPanel) = nil; -GVAR(currentRightPanel) = nil; -GVAR(leftSearchbarFocus) = false; -GVAR(rightSearchbarFocus) = false; -GVAR(leftTabFocus) = false; -GVAR(rightTabFocus) = false; -GVAR(rightTabLnBFocus) = false; - -{ - private _panel = _display displayCtrl _x; - _panel ctrlSetFontHeight (GVAR(fontHeight) * GRID_H); - _panel ctrlCommit 0; -} foreach [IDC_leftTabContent, IDC_rightTabContent, IDC_rightTabContentListnBox]; - -[_display, _display displayCtrl IDC_buttonPrimaryWeapon] call FUNC(fillLeftPanel); - //--------------- Camera prep cutText ["","plain"]; showCommandingMenu ""; @@ -314,6 +297,23 @@ if (is3DEN) then { if (get3denactionstate "togglemap" > 0) then {do3DENAction "togglemap";}; }; +//--------------- Prepare the left panel +GVAR(currentLeftPanel) = nil; +GVAR(currentRightPanel) = nil; +GVAR(leftSearchbarFocus) = false; +GVAR(rightSearchbarFocus) = false; +GVAR(leftTabFocus) = false; +GVAR(rightTabFocus) = false; +GVAR(rightTabLnBFocus) = false; + +{ + private _panel = _display displayCtrl _x; + _panel ctrlSetFontHeight (GVAR(fontHeight) * GRID_H); + _panel ctrlCommit 0; +} foreach [IDC_leftTabContent, IDC_rightTabContent, IDC_rightTabContentListnBox]; + +[_display, _display displayCtrl IDC_buttonPrimaryWeapon] call FUNC(fillLeftPanel); + //--------------- Init camera GVAR(cameraPosition) = [5,0,0,[0,0,0.85]];