mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
Replace forEach with Count
Use count where you do not need _forEachIndex variable, it's quicker than forEach.
This commit is contained in:
@@ -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;
|
||||
};
|
||||
Reference in New Issue
Block a user