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

@@ -115,11 +115,11 @@ while {1 == 1} do {
diag_log(format["CRASHSPAWNER: Loot spawn at '%1' with loot table '%2'", _crashName, _lootTable]);
// 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;
};
};