Skip to content

Commit

Permalink
Case-insensitive check for valid throwables
Browse files Browse the repository at this point in the history
  • Loading branch information
mrschick committed Jan 14, 2025
1 parent 4a65e32 commit 24aa251
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/weaponselect/functions/fnc_selectNextGrenade.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ _currentGrenade = _currentGrenade select 0;
private _grenadeType = [GVAR(GrenadesAll), GVAR(GrenadesFrag), GVAR(GrenadesNonFrag)] select _type;

// This is faster than checking magazines
private _grenades = (throwables _unit) apply {_x select 0} select {_x in _grenadeType};
private _grenades = (throwables _unit) apply {_x select 0} select {private _i = _x; _grenadeType findIf {_x == _i} != -1};

// abort if no grenades are available
if (_grenades isEqualTo []) exitWith {false};
Expand Down

0 comments on commit 24aa251

Please sign in to comment.