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:
@@ -20,7 +20,7 @@ _lootChance = getNumber (_config >> "lootChance");
|
||||
|
||||
//_countPositions = count _pos;
|
||||
_qty = 0; // effective quantity of spawned weaponholder
|
||||
_lootSpawnBias = 67; //67 between 50 and 100. The lower it is, the lower chance some of the lootpiles will spawn
|
||||
_lootSpawnBias = 67; //67 between 50 && 100. The lower it is, the lower chance some of the lootpiles will spawn
|
||||
|
||||
|
||||
// shuffles an array
|
||||
@@ -75,7 +75,7 @@ _bias = (_bias + random(100 - _bias)) / 100;
|
||||
};
|
||||
};
|
||||
};
|
||||
} forEach _positions;
|
||||
} count _positions;
|
||||
|
||||
// small loot
|
||||
_posSmall = [] + getArray (_config >> "lootPosSmall");
|
||||
@@ -114,4 +114,4 @@ _positionsSmall = _posSmall call _ShuffleArray;
|
||||
};
|
||||
};
|
||||
};
|
||||
} forEach _positionsSmall;
|
||||
} count _positionsSmall;
|
||||
Reference in New Issue
Block a user