mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
Fix undefined error _hasBloodBag in fn_damageActions
When this function was passed an empty array (like a player with no magazines) it returned undefined because the inside of the forEach loop did not execute.
This commit is contained in:
@@ -8,11 +8,13 @@ dz_fn_array_pushBack =
|
||||
//Returns true if the given predicate evaluates to true for any element in the array
|
||||
dz_fn_array_any =
|
||||
{
|
||||
private "_return";
|
||||
_return = false;
|
||||
{
|
||||
if (_x call (_this select 1)) exitWith { true };
|
||||
false
|
||||
if (_x call (_this select 1)) exitWith { _return = true };
|
||||
}
|
||||
foreach (_this select 0);
|
||||
_return
|
||||
};
|
||||
|
||||
//Returns true if the given predicate evaluates to true for all elements in the array
|
||||
|
||||
Reference in New Issue
Block a user