Arsenal - Fix arsenal not working reliably on remote AI units. (#6784)

* Fix 6701

* Update addons/arsenal/functions/fnc_onArsenalClose.sqf

Co-Authored-By: alganthe <alganthe@live.fr>
This commit is contained in:
Josuan Albin 2019-01-26 21:13:38 +01:00 committed by PabstMirror
parent 3df805306b
commit 8450555f0c
3 changed files with 12 additions and 4 deletions

View File

@ -66,6 +66,11 @@ if (is3DEN) then {
deleteVehicle GVAR(cameraHelper);
camDestroy GVAR(camera);
if (!isNil QGVAR(moduleUsed)) then {
GVAR(moduleUsed) = nil;
objNull remoteControl GVAR(center);
};
if (isMultiplayer) then {
[QGVAR(broadcastFace), [GVAR(center), GVAR(currentFace)], QGVAR(center) + "_face"] call CBA_fnc_globalEventJIP;

View File

@ -57,7 +57,7 @@ switch (GVAR(currentLeftPanel)) do {
call _fnc_clearPreviousWepMags;
private _compatibleItems = (_item call bis_fnc_compatibleItems) apply {tolower _x};
GVAR(center) addWeaponGlobal _item;
GVAR(center) addWeapon _item;
GVAR(center) addWeaponItem [_item, [(getArray (configfile >> "cfgweapons" >> _item >> "magazines")) select 0]];
{
@ -95,7 +95,7 @@ switch (GVAR(currentLeftPanel)) do {
call _fnc_clearPreviousWepMags;
private _compatibleItems = (_item call bis_fnc_compatibleItems) apply {tolower _x};
GVAR(center) addWeaponGlobal _item;
GVAR(center) addWeapon _item;
GVAR(center) addWeaponItem [_item, [(getArray (configfile >> "cfgweapons" >> _item >> "magazines")) select 0]];
{
@ -132,7 +132,7 @@ switch (GVAR(currentLeftPanel)) do {
call _fnc_clearPreviousWepMags;
private _compatibleItems = (_item call bis_fnc_compatibleItems) apply {tolower _x};
GVAR(center) addWeaponGlobal _item;
GVAR(center) addWeapon _item;
GVAR(center) addWeaponItem [_item, [(getArray (configfile >> "cfgweapons" >> _item >> "magazines")) select 0]];
{
@ -295,7 +295,7 @@ switch (GVAR(currentLeftPanel)) do {
GVAR(currentItems) set [9, _item];
} else {
if ((GVAR(currentItems) select 9) != _item) then {
GVAR(center) addWeaponGlobal _item;
GVAR(center) addWeapon _item;
GVAR(currentItems) set [9, _item];
call FUNC(showItem);
ADDBINOCULARSMAG

View File

@ -39,6 +39,9 @@ if (_activated && local _logic) then {
[{
params ["_unit"];
player remoteControl _unit;
EGVAR(arsenal,moduleUsed) = true;
[_unit, _unit, true] call EFUNC(arsenal,openBox);
}, [_unit]] call CBA_fnc_directCall;
} else {