mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fix count problems
This commit is contained in:
parent
e3a31687a8
commit
b9db03de20
@ -123,7 +123,7 @@ _addToCrateCount = [];
|
||||
_addToCrateCount pushBack 1;
|
||||
};
|
||||
};
|
||||
} count _targetItemsStart;
|
||||
} forEach _targetItemsStart;
|
||||
|
||||
//Add the items to the holder (combined to reduce addItemCargoGlobal calls)
|
||||
{
|
||||
|
@ -31,12 +31,12 @@ _itemsToAdd = [];
|
||||
if (_x == (vest _target)) then {
|
||||
_itemsToAdd = _itemsToAdd + (vestItems _target);
|
||||
};
|
||||
} count _listOfObjectsToRemove;
|
||||
} forEach _listOfObjectsToRemove;
|
||||
|
||||
{
|
||||
if (!(_x in _listOfObjectsToRemove)) then {
|
||||
_listOfObjectsToRemove pushBack _x;
|
||||
};
|
||||
} count _itemsToAdd;
|
||||
} forEach _itemsToAdd;
|
||||
|
||||
[_caller, _target, _listOfObjectsToRemove] call FUNC(disarmDropItems);
|
||||
|
@ -18,15 +18,14 @@
|
||||
|
||||
params ["_target"];
|
||||
|
||||
private ["_allGear"];
|
||||
|
||||
private ["_items", "_counts"];
|
||||
|
||||
_items = [];
|
||||
_counts = [];
|
||||
{
|
||||
_x params ["_item", "_count"];
|
||||
_item append _item;
|
||||
_count append _count;
|
||||
} count [(getWeaponCargo _target), (getItemCargo _target), (getMagazineCargo _target), (getBackpackCargo _target)];
|
||||
_items append _item;
|
||||
_counts append _count;
|
||||
} forEach [(getWeaponCargo _target), (getItemCargo _target), (getMagazineCargo _target), (getBackpackCargo _target)];
|
||||
|
||||
[_items,_counts] // Return
|
||||
|
@ -50,6 +50,6 @@ _classnamesCount = [];
|
||||
_uniqueClassnames pushBack _x;
|
||||
_classnamesCount pushBack 1;
|
||||
};
|
||||
} count _allItems;
|
||||
} forEach _allItems;
|
||||
|
||||
[_uniqueClassnames, _classnamesCount]
|
||||
|
@ -37,6 +37,6 @@ _problem = false;
|
||||
_index = _beginingArray find _x;
|
||||
if (_index == -1) exitWith {_problem = true;};
|
||||
_beginingArray deleteAt _index;
|
||||
} count (_endA + _endB);
|
||||
} forEach (_endA + _endB);
|
||||
|
||||
(!_problem) && {_beginingArray isEqualTo []}
|
||||
|
Loading…
Reference in New Issue
Block a user