mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-15 04:23:13 +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:
@@ -14,7 +14,7 @@ if (local _animalbody) then {
|
||||
_timer = _this select 0;
|
||||
_body = _this select 1;
|
||||
_pos = getPosATL _body;
|
||||
while {(count magazines _body >0) and (time - _timer < 300) } do {
|
||||
while {(count magazines _body >0) && (time - _timer < 300) } do {
|
||||
sleep 5;
|
||||
};
|
||||
|
||||
@@ -24,11 +24,11 @@ if (local _animalbody) then {
|
||||
_inRange = _pos nearEntities ["CAManBase",100];
|
||||
{
|
||||
// only send to other players
|
||||
if(isPlayer _x and _x != player) then {
|
||||
if(isPlayer _x && _x != player) then {
|
||||
PVDZE_send = [_x,"HideBody",[_body]];
|
||||
publicVariableServer "PVDZE_send";
|
||||
};
|
||||
} forEach _inRange;
|
||||
} count _inRange;
|
||||
|
||||
sleep 5;
|
||||
deleteVehicle _body;
|
||||
|
||||
Reference in New Issue
Block a user