Arsenal - Provide reference to the current box (#7948)

* arsenal: provide ref to current box

* use objNull instead of nil

* Update fnc_openBox.sqf
This commit is contained in:
Brett 2020-10-26 11:01:18 -06:00 committed by GitHub
parent 0f6a9ecb87
commit a67d6eecb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 0 deletions

View File

@ -1,6 +1,8 @@
#include "script_component.hpp"
#include "defines.hpp"
GVAR(currentBox) = objNull;
GVAR(EH_ID) = 0;
GVAR(lastSearchTextLeft) = "";
GVAR(lastSearchTextRight) = "";

View File

@ -80,6 +80,8 @@ if (isMultiplayer) then {
[QGVAR(center) + "_voice", GVAR(center)] call CBA_fnc_removeGlobalEventJIP;
};
GVAR(currentBox) = objNull;
GVAR(camera) = nil;
GVAR(cameraHelper) = nil;

View File

@ -41,6 +41,8 @@ if (isNil "_displayToUse" || {!isnil QGVAR(camera)}) exitWith {
[localize LSTRING(CantOpenDisplay), false, 5, 1] call EFUNC(common,displayText);
};
GVAR(currentBox) = _object;
if (_mode) then {
GVAR(virtualItems) = +(uiNamespace getVariable QGVAR(configItems));
} else {