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:
@@ -4,7 +4,7 @@ _weapon = _this select 1;
|
||||
_ammo = _this select 4;
|
||||
_projectile = _this select 6;
|
||||
|
||||
if (_ammo isKindOf "Hatchet_Swing_Ammo" or _ammo isKindOf "Chainsaw_Swing_Ammo") then {
|
||||
if (_ammo isKindOf "Hatchet_Swing_Ammo" || _ammo isKindOf "Chainsaw_Swing_Ammo") then {
|
||||
|
||||
_findNearestTree = [];
|
||||
{
|
||||
@@ -20,7 +20,7 @@ if (_ammo isKindOf "Hatchet_Swing_Ammo" or _ammo isKindOf "Chainsaw_Swing_Ammo")
|
||||
};
|
||||
};
|
||||
};
|
||||
} foreach nearestObjects [getPosATL player, [], 20];
|
||||
} count nearestObjects [getPosATL player, [], 20];
|
||||
|
||||
//diag_log ("POSITION: " + str(_endPos));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user