From d0f97f0b7ec241d9bf11a5302937006a750ef388 Mon Sep 17 00:00:00 2001 From: Timi007 Date: Fri, 10 Jun 2022 22:53:29 +0200 Subject: [PATCH] Remove hack --- addons/flags/functions/fnc_carryFlag.sqf | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/addons/flags/functions/fnc_carryFlag.sqf b/addons/flags/functions/fnc_carryFlag.sqf index f66030a9ca..5d55856338 100644 --- a/addons/flags/functions/fnc_carryFlag.sqf +++ b/addons/flags/functions/fnc_carryFlag.sqf @@ -17,21 +17,10 @@ */ params ["_unit", "_item"]; +TRACE_2("Carry flag", _unit, _item); -// Arma needs a flag proxy and some modded uniforms don't have them. -// If we temporarily change the uniform to a vanilla one we can work around this problem. -private _loadout = getUnitLoadout _unit; -_unit forceAddUniform "U_B_CombatUniform_mcam"; - -private _texture = (GVAR(flagItemCache) get _item) param [1, ""]; +(GVAR(flagItemCache) get _item) params ["", "_texture"]; _unit forceFlagTexture _texture; -// We need to change loadout in the next frame otherwise it will not work -[{ - params ["_unit", "_item", "_loadout"]; - - _unit setUnitLoadout _loadout; - - _unit setVariable [QGVAR(carryingFlag), _item, true]; - _unit removeItem _item; -}, [_unit, _item, _loadout]] call CBA_fnc_execNextFrame; +_unit setVariable [QGVAR(carryingFlag), _item, true]; +_unit removeItem _item;