mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-24 09:00:50 +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:
@@ -18,7 +18,7 @@ switch (_type) do {
|
||||
if( (_removed < _countIn) && ((_x == _itemIn) || configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn)) then {
|
||||
_removed = _removed + ([player,_x] call BIS_fnc_invRemove);
|
||||
};
|
||||
} forEach magazines player;
|
||||
} count magazines player;
|
||||
if(_removed == _countIn) then {
|
||||
_handle setFSMVariable ["_hunger",0];
|
||||
player removeAction s_player_feeddog;
|
||||
|
||||
@@ -6,7 +6,7 @@ _handle setFSMVariable ["_command","stay"];
|
||||
_watchDog = _handle getFSMVariable "_watchDog";
|
||||
|
||||
_anim = animationState _dog;
|
||||
if (_anim == "Dog_SitDown" and _watchDog) then {
|
||||
if (_anim == "Dog_SitDown" && _watchDog) then {
|
||||
//[objNull, _dog, rSwitchMove,"Dog_SitUp"] call RE;
|
||||
//sleep 0.5;
|
||||
[objNull, _dog, rSwitchMove,"Dog_LieDown"] call RE;
|
||||
|
||||
@@ -12,7 +12,7 @@ _handle setFSMVariable ["_watchDog",_watchDog];
|
||||
_warn = {
|
||||
private ["_watchDog","_dog","_nearby","_senseSkill","_handle"];
|
||||
_handle = _this select 0;
|
||||
while {_watchDog and alive _dog} do {
|
||||
while {_watchDog && alive _dog} do {
|
||||
_watchDog = _handle getFSMVariable "_watchDog";
|
||||
_senseSkill = _handle getFSMVariable "_senseSkill";
|
||||
if (_watchDog) then {
|
||||
|
||||
Reference in New Issue
Block a user