From 7f1b8db85a38782750d5d5636e53c32d3e617500 Mon Sep 17 00:00:00 2001 From: ebaydayz Date: Thu, 28 Apr 2016 21:33:54 -0400 Subject: [PATCH] Fix MeleeMagazines showing in crafting UI Vanilla development commit: https://github.com/DayZMod/DayZ/commit/f2e1623ba1430d79b65b241023caffbefe4df4e1 --- SQF/dayz_code/compile/fn_updateCraftUI.sqf | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/SQF/dayz_code/compile/fn_updateCraftUI.sqf b/SQF/dayz_code/compile/fn_updateCraftUI.sqf index b4882b557..f3462bb0f 100644 --- a/SQF/dayz_code/compile/fn_updateCraftUI.sqf +++ b/SQF/dayz_code/compile/fn_updateCraftUI.sqf @@ -109,12 +109,14 @@ _getGear = { } forEach (_weapons); { - _index = [_return, _x] call _inArray; + if !(_x in MeleeMagazines) then { + _index = [_return, _x] call _inArray; - if (_index != -1) then { - _return set [_index, [_x, ((_return select _index) select 1) + 1, 0]]; - } else { - _return set [count _return, [_x, 1, 0]]; + if (_index != -1) then { + _return set [_index, [_x, ((_return select _index) select 1) + 1, 0]]; + } else { + _return set [count _return, [_x, 1, 0]]; + }; }; } forEach (_magazines); };