Replace forEach with Count

Use count where you do not need _forEachIndex variable, it's quicker
than forEach.
This commit is contained in:
icomrade
2014-05-27 15:37:57 -04:00
parent 91d246e64e
commit e54b9983dd
210 changed files with 890 additions and 890 deletions

View File

@@ -29,7 +29,7 @@ while {r_doLoop} do {
if (_isMedic) then {
_started = true;
};
if (_started and !_isMedic) then {
if (_started && !_isMedic) then {
r_doLoop = false;
_finished = true;
};
@@ -50,9 +50,9 @@ if(!_finished) then {
};
if (_finished) then {
// take jerry can and replace with empty
// take jerry can && replace with empty
if(!(_vehicle getVariable ["GeneratorFilled", false]) and ("ItemJerrycan" in magazines player)) then {
if(!(_vehicle getVariable ["GeneratorFilled", false]) && ("ItemJerrycan" in magazines player)) then {
if(([player,"ItemJerrycan"] call BIS_fnc_invRemove) == 1) then {
player addMagazine "ItemJerrycanEmpty";