mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fix blacklist not working in multiplayer (#6598)
This commit is contained in:
parent
9aa34ab462
commit
e54e8d0f8c
@ -21,9 +21,16 @@ _value params ["_items", "_mode"];
|
||||
TRACE_2("Initializing object with attribute",_object,_value);
|
||||
|
||||
if (_mode > 0) then {
|
||||
// Blacklist: all full arsenal and take items away
|
||||
// Blacklist: add full arsenal and take items away
|
||||
[_object, true, true] call FUNC(initBox);
|
||||
[_object, _items, true] call FUNC(removeVirtualItems);
|
||||
|
||||
// Need to delay removal by 2 frames
|
||||
[{
|
||||
[{
|
||||
params ["_object", "_items"];
|
||||
[_object, _items, true] call FUNC(removeVirtualItems);
|
||||
}, _this] call CBA_fnc_execNextFrame;
|
||||
}, [_object, _items]] call CBA_fnc_execNextFrame;
|
||||
} else {
|
||||
// Exit on whitelist mode with no items
|
||||
if (_items isEqualTo []) exitWith {};
|
||||
|
@ -30,7 +30,7 @@ if (_global && {isMultiplayer} && {{_object in _x} count GVAR(EHIDArray) == 0})
|
||||
|
||||
private _ID = [QGVAR(initBox), [_object, _items, false]] call CBA_fnc_globalEventJIP;
|
||||
[_ID, _object] call CBA_fnc_removeGlobalEventJIP;
|
||||
|
||||
|
||||
GVAR(EHIDArray) pushBack [_ID, _object];
|
||||
publicVariable QGVAR(EHIDArray);
|
||||
} else {
|
||||
@ -38,19 +38,19 @@ if (_global && {isMultiplayer} && {{_object in _x} count GVAR(EHIDArray) == 0})
|
||||
if ({(_x select 0) select 0 isEqualTo QGVAR(interaction)} count (_object getVariable [QEGVAR(interact_menu,actions), []]) == 0) then {
|
||||
|
||||
private _action = [
|
||||
QGVAR(interaction),
|
||||
QGVAR(interaction),
|
||||
localize "STR_A3_Arsenal",
|
||||
"",
|
||||
"",
|
||||
{
|
||||
params ["_target", "_player"];
|
||||
|
||||
[_target, _player] call FUNC(openBox);
|
||||
},
|
||||
},
|
||||
{
|
||||
params ["_target", "_player"];
|
||||
|
||||
|
||||
[_player, _target] call EFUNC(common,canInteractWith)
|
||||
},
|
||||
},
|
||||
{},
|
||||
[]
|
||||
] call EFUNC(interact_menu,createAction);
|
||||
|
Loading…
Reference in New Issue
Block a user