diff --git a/addons/disarming/functions/fnc_disarmDropItems.sqf b/addons/disarming/functions/fnc_disarmDropItems.sqf index 567199e6cf..91eff1c99d 100644 --- a/addons/disarming/functions/fnc_disarmDropItems.sqf +++ b/addons/disarming/functions/fnc_disarmDropItems.sqf @@ -123,7 +123,7 @@ _addToCrateCount = []; _addToCrateCount pushBack 1; }; }; -} count _targetItemsStart; +} forEach _targetItemsStart; //Add the items to the holder (combined to reduce addItemCargoGlobal calls) { diff --git a/addons/disarming/functions/fnc_eventTargetStart.sqf b/addons/disarming/functions/fnc_eventTargetStart.sqf index 771365d602..29c370f2b5 100644 --- a/addons/disarming/functions/fnc_eventTargetStart.sqf +++ b/addons/disarming/functions/fnc_eventTargetStart.sqf @@ -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); diff --git a/addons/disarming/functions/fnc_getAllGearContainer.sqf b/addons/disarming/functions/fnc_getAllGearContainer.sqf index 89901ee983..0394761197 100644 --- a/addons/disarming/functions/fnc_getAllGearContainer.sqf +++ b/addons/disarming/functions/fnc_getAllGearContainer.sqf @@ -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 diff --git a/addons/disarming/functions/fnc_getAllGearUnit.sqf b/addons/disarming/functions/fnc_getAllGearUnit.sqf index 4eb45f94f2..bdd1ff0bf9 100644 --- a/addons/disarming/functions/fnc_getAllGearUnit.sqf +++ b/addons/disarming/functions/fnc_getAllGearUnit.sqf @@ -50,6 +50,6 @@ _classnamesCount = []; _uniqueClassnames pushBack _x; _classnamesCount pushBack 1; }; -} count _allItems; +} forEach _allItems; [_uniqueClassnames, _classnamesCount] diff --git a/addons/disarming/functions/fnc_verifyMagazinesMoved.sqf b/addons/disarming/functions/fnc_verifyMagazinesMoved.sqf index 36ed87fcd1..efe5aae72a 100644 --- a/addons/disarming/functions/fnc_verifyMagazinesMoved.sqf +++ b/addons/disarming/functions/fnc_verifyMagazinesMoved.sqf @@ -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 []}