mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +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
|
//Returns true if the given predicate evaluates to true for any element in the array
|
||||||
dz_fn_array_any =
|
dz_fn_array_any =
|
||||||
{
|
{
|
||||||
|
private "_return";
|
||||||
|
_return = false;
|
||||||
{
|
{
|
||||||
if (_x call (_this select 1)) exitWith { true };
|
if (_x call (_this select 1)) exitWith { _return = true };
|
||||||
false
|
|
||||||
}
|
}
|
||||||
foreach (_this select 0);
|
foreach (_this select 0);
|
||||||
|
_return
|
||||||
};
|
};
|
||||||
|
|
||||||
//Returns true if the given predicate evaluates to true for all elements in the array
|
//Returns true if the given predicate evaluates to true for all elements in the array
|
||||||
|
|||||||
Reference in New Issue
Block a user