mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-19 22:52:56 +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:
@@ -92,7 +92,7 @@ if (!isDedicated) then { //dw, particle stuff don't need run on dedicated
|
||||
clearvehicleinit _v;
|
||||
deleteVehicle _v;
|
||||
_v =(_wreck) createvehicle _pos;
|
||||
{_x moveincargo _v} foreach _crw;
|
||||
{_x moveincargo _v} count _crw;
|
||||
_v setVectorDirAndUp [_dir,_vecUp];
|
||||
_v setFuel 0;
|
||||
_v setdamage 0;
|
||||
@@ -126,7 +126,7 @@ else
|
||||
clearvehicleinit _v;
|
||||
deleteVehicle _v;
|
||||
_v =(_wreck) createvehicle _pos;
|
||||
{_x moveincargo _v} foreach _crw;
|
||||
{_x moveincargo _v} count _crw;
|
||||
//sleep 0.05;
|
||||
_v setvelocity _vel;
|
||||
//_v setPos _pos;
|
||||
|
||||
@@ -10,7 +10,7 @@ if (count _this > 2) then {_lifecheck=_this select 2};
|
||||
|
||||
_int = _int min 3;
|
||||
|
||||
if (!((_v isKindOf "Air")OR{((_v isKindOf "LandVehicle")OR{(_v isKindOf "Ship")})})) exitWith {};
|
||||
if (!((_v isKindOf "Air")||{((_v isKindOf "LandVehicle")||{(_v isKindOf "Ship")})})) exitWith {};
|
||||
|
||||
_effect2pos = _v selectionposition "destructionEffect2";
|
||||
|
||||
@@ -24,4 +24,4 @@ while {_int>1} do
|
||||
sleep _x;
|
||||
if((_lifecheck&&(alive _v))||(isnull _v)||(((getposASL _v)select 2)<0))exitwith{};
|
||||
createVehicle ["SmallSecondary", (_v modelToWorld _effect2pos), [], 0, "CAN_COLLIDE"];
|
||||
}foreach(_list);
|
||||
}count(_list);
|
||||
Reference in New Issue
Block a user