Remove hack

This commit is contained in:
Timi007 2022-06-10 22:53:29 +02:00
parent 6fef624645
commit d0f97f0b7e
No known key found for this signature in database
GPG Key ID: AFC60E0DA93308DA

View File

@ -17,21 +17,10 @@
*/ */
params ["_unit", "_item"]; params ["_unit", "_item"];
TRACE_2("Carry flag", _unit, _item);
// Arma needs a flag proxy and some modded uniforms don't have them. (GVAR(flagItemCache) get _item) params ["", "_texture"];
// 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, ""];
_unit forceFlagTexture _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 setVariable [QGVAR(carryingFlag), _item, true];
_unit removeItem _item; _unit removeItem _item;
}, [_unit, _item, _loadout]] call CBA_fnc_execNextFrame;