mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-24 17:10:49 +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:
@@ -88,7 +88,7 @@ while {true} do {
|
||||
|
||||
[_level] call R3F_TIRED_FNCT_Voile_Noir;
|
||||
|
||||
if (R3F_TIRED_Accumulator > R3F_TIRED_BLACKOUT_LEVEL and scriptDone R3F_TIRED_Handle_Blackout_Effect and scriptDone R3F_TIRED_Handle_Blur_Effect) then {
|
||||
if (R3F_TIRED_Accumulator > R3F_TIRED_BLACKOUT_LEVEL && scriptDone R3F_TIRED_Handle_Blackout_Effect && scriptDone R3F_TIRED_Handle_Blur_Effect) then {
|
||||
R3F_TIRED_Handle_Blackout_Effect = [] spawn R3F_TIRED_FNCT_DoBlackVanish;
|
||||
};
|
||||
} else {
|
||||
|
||||
@@ -18,5 +18,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#define R3F_WEIGHT_SHOW_WEIGHT
|
||||
|
||||
//show or not classes not found in arma.rpt
|
||||
//show || not classes not found in arma.rpt
|
||||
//#define R3F_WEIGHT_SHOW_CLASSES_NOT_FOUND
|
||||
@@ -23,7 +23,7 @@ R3F_WEIGHT_FNCT_MakeSingleArray = {
|
||||
};
|
||||
_n = _n + 1;
|
||||
|
||||
}foreach _arr_i;
|
||||
}count _arr_i;
|
||||
|
||||
_arr;
|
||||
};
|
||||
@@ -57,7 +57,7 @@ R3F_WEIGHT_FNCT_GetItemWeight = {
|
||||
};
|
||||
};
|
||||
};
|
||||
}foreach _arr_class;
|
||||
}count _arr_class;
|
||||
_total_weight;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user