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

@@ -44,7 +44,7 @@ if (_ammo isKindOf "SmokeShell") then {
_group setVariable ["targets",_targets,true];
};
_i = _i + 1;
} forEach _listTalk;
} count _listTalk;
} else {
[_unit,_distance,true,(getPosATL player)] spawn player_alertZombies;
//Check if need to place arrow
@@ -65,11 +65,11 @@ if (_ammo isKindOf "SmokeShell") then {
_pos = getPosATL player;
_inRange = _pos nearEntities ["CAManBase",1250];
{
if(isPlayer _x and _x != player) then {
if(isPlayer _x && _x != player) then {
PVDZE_send = [_x,"RoadFlare",[_projectile,0]];
publicVariableServer "PVDZE_send";
};
} forEach _inRange;
} count _inRange;
_id = _this spawn player_throwObject;
};
@@ -81,11 +81,11 @@ if (_ammo isKindOf "SmokeShell") then {
_pos = getPosATL player;
_inRange = _pos nearEntities ["CAManBase",1250];
{
if(isPlayer _x and _x != player) then {
if(isPlayer _x && _x != player) then {
PVDZE_send = [_x,"RoadFlare",[_projectile,1]];
publicVariableServer "PVDZE_send";
}
} forEach _inRange;
} count _inRange;
_id = _this spawn player_throwObject;
};