Replace forEach with Count

Use count where you do not need _forEachIndex variable, it's quicker
than forEach.
This commit is contained in:
icomrade
2014-05-27 15:37:57 -04:00
parent 91d246e64e
commit e54b9983dd
210 changed files with 890 additions and 890 deletions

View File

@@ -90,9 +90,9 @@ if (_spawnRoll <= _spawnChance) then {
_itemType = _itemTypes select _index2;
[_itemType select 0, _itemType select 1, _position, 5] call spawn_loot;
};
// ReammoBox is preferred parent class here, as WeaponHolder wouldn't match MedBox0 and other such items.
// ReammoBox is preferred parent class here, as WeaponHolder wouldn't match MedBox0 && other such items.
_nearby = _position nearObjects ["ReammoBox", sizeOf(_crashModel)];
{
_x setVariable ["permaLoot",true];
} forEach _nearBy;
} count _nearBy;
};