Fix blacklist not working in multiplayer (#6598)

This commit is contained in:
mharis001 2018-10-07 23:49:29 -04:00 committed by PabstMirror
parent 9aa34ab462
commit e54e8d0f8c
2 changed files with 15 additions and 8 deletions

View File

@ -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);
// 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 {};