mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
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:
parent
3df805306b
commit
8450555f0c
@ -66,6 +66,11 @@ if (is3DEN) then {
|
|||||||
deleteVehicle GVAR(cameraHelper);
|
deleteVehicle GVAR(cameraHelper);
|
||||||
camDestroy GVAR(camera);
|
camDestroy GVAR(camera);
|
||||||
|
|
||||||
|
if (!isNil QGVAR(moduleUsed)) then {
|
||||||
|
GVAR(moduleUsed) = nil;
|
||||||
|
objNull remoteControl GVAR(center);
|
||||||
|
};
|
||||||
|
|
||||||
if (isMultiplayer) then {
|
if (isMultiplayer) then {
|
||||||
|
|
||||||
[QGVAR(broadcastFace), [GVAR(center), GVAR(currentFace)], QGVAR(center) + "_face"] call CBA_fnc_globalEventJIP;
|
[QGVAR(broadcastFace), [GVAR(center), GVAR(currentFace)], QGVAR(center) + "_face"] call CBA_fnc_globalEventJIP;
|
||||||
|
@ -57,7 +57,7 @@ switch (GVAR(currentLeftPanel)) do {
|
|||||||
call _fnc_clearPreviousWepMags;
|
call _fnc_clearPreviousWepMags;
|
||||||
|
|
||||||
private _compatibleItems = (_item call bis_fnc_compatibleItems) apply {tolower _x};
|
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]];
|
GVAR(center) addWeaponItem [_item, [(getArray (configfile >> "cfgweapons" >> _item >> "magazines")) select 0]];
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -95,7 +95,7 @@ switch (GVAR(currentLeftPanel)) do {
|
|||||||
call _fnc_clearPreviousWepMags;
|
call _fnc_clearPreviousWepMags;
|
||||||
|
|
||||||
private _compatibleItems = (_item call bis_fnc_compatibleItems) apply {tolower _x};
|
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]];
|
GVAR(center) addWeaponItem [_item, [(getArray (configfile >> "cfgweapons" >> _item >> "magazines")) select 0]];
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -132,7 +132,7 @@ switch (GVAR(currentLeftPanel)) do {
|
|||||||
call _fnc_clearPreviousWepMags;
|
call _fnc_clearPreviousWepMags;
|
||||||
|
|
||||||
private _compatibleItems = (_item call bis_fnc_compatibleItems) apply {tolower _x};
|
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]];
|
GVAR(center) addWeaponItem [_item, [(getArray (configfile >> "cfgweapons" >> _item >> "magazines")) select 0]];
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -295,7 +295,7 @@ switch (GVAR(currentLeftPanel)) do {
|
|||||||
GVAR(currentItems) set [9, _item];
|
GVAR(currentItems) set [9, _item];
|
||||||
} else {
|
} else {
|
||||||
if ((GVAR(currentItems) select 9) != _item) then {
|
if ((GVAR(currentItems) select 9) != _item) then {
|
||||||
GVAR(center) addWeaponGlobal _item;
|
GVAR(center) addWeapon _item;
|
||||||
GVAR(currentItems) set [9, _item];
|
GVAR(currentItems) set [9, _item];
|
||||||
call FUNC(showItem);
|
call FUNC(showItem);
|
||||||
ADDBINOCULARSMAG
|
ADDBINOCULARSMAG
|
||||||
|
@ -39,6 +39,9 @@ if (_activated && local _logic) then {
|
|||||||
[{
|
[{
|
||||||
params ["_unit"];
|
params ["_unit"];
|
||||||
|
|
||||||
|
player remoteControl _unit;
|
||||||
|
EGVAR(arsenal,moduleUsed) = true;
|
||||||
|
|
||||||
[_unit, _unit, true] call EFUNC(arsenal,openBox);
|
[_unit, _unit, true] call EFUNC(arsenal,openBox);
|
||||||
}, [_unit]] call CBA_fnc_directCall;
|
}, [_unit]] call CBA_fnc_directCall;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user