From 5bbffa05a25bf8c7951371623d577957b4fb1d7b Mon Sep 17 00:00:00 2001 From: Dedmen Miller Date: Wed, 28 Nov 2018 08:24:27 +0100 Subject: [PATCH] Fix quickTag --- addons/tagging/functions/fnc_quickTag.sqf | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/addons/tagging/functions/fnc_quickTag.sqf b/addons/tagging/functions/fnc_quickTag.sqf index bb672ed9471..3014f7857a9 100644 --- a/addons/tagging/functions/fnc_quickTag.sqf +++ b/addons/tagging/functions/fnc_quickTag.sqf @@ -49,5 +49,13 @@ if (GVAR(quickTag) == 3) then { // Tag if !(_possibleTags isEqualTo []) then { private _availableTags = _possibleTags select {(_x select 2) in (_unit call EFUNC(common,uniqueItems))}; - [_unit, selectRandom ((selectRandom _availableTags) select 3)] call FUNC(tag); + (selectRandom _availableTags) params ["", "", "_textures", "", "_materials"]; + private _randomTexture = selectRandom _textures; + private _randomMaterial = if (count _textures == count _materials) then { + _materials select (_textures find _randomTexture) + } else { + selectRandom _materials + }; + + [_unit, _randomTexture, _randomMaterial] call FUNC(tag); };