From ab2e28094d13e106d3d5cffbd4983f62ae51878e Mon Sep 17 00:00:00 2001 From: johnb432 <58661205+johnb432@users.noreply.github.com> Date: Tue, 20 Aug 2024 21:10:11 +0200 Subject: [PATCH 1/2] Add distance to interaction anims --- addons/interaction/functions/fnc_initAnimActions.sqf | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/addons/interaction/functions/fnc_initAnimActions.sqf b/addons/interaction/functions/fnc_initAnimActions.sqf index 673946a2e16..fcd183cd75a 100644 --- a/addons/interaction/functions/fnc_initAnimActions.sqf +++ b/addons/interaction/functions/fnc_initAnimActions.sqf @@ -180,13 +180,19 @@ private _config = configOf _object; private _icon = [_animConfig >> "icon", "TEXT", "\A3\ui_f\data\igui\cfg\actions\take_ca.paa"] call CBA_fnc_getConfigEntry; private _duration = [_animConfig >> "duration", "NUMBER", 10] call CBA_fnc_getConfigEntry; private _text = getText (_animConfig >> "text"); + private _distance = [_animConfig >> "distance", "NUMBER", 2] call CBA_fnc_getConfigEntry; { private _action = [ format [QGVAR(anim_%1_%2), _anim, _forEachIndex], - _name, _icon, _statement, _condition, {}, + _name, + _icon, + _statement, + _condition, + {}, [_anim, _phase, _duration, _text], - _x + _x, + _distance ] call EFUNC(interact_menu,createAction); [_class, 0, [], _action] call EFUNC(interact_menu,addActionToClass); TRACE_3("add anim",_class,_anim,_x); From 35c140ceab9c2687473301ecde4dc6b1f85a924b Mon Sep 17 00:00:00 2001 From: johnb432 <58661205+johnb432@users.noreply.github.com> Date: Tue, 20 Aug 2024 21:34:36 +0200 Subject: [PATCH 2/2] Update badger to use distance instead of multiple interactions --- addons/interaction/CfgVehicles.hpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/addons/interaction/CfgVehicles.hpp b/addons/interaction/CfgVehicles.hpp index b3a0c1d37e1..4f769f214c1 100644 --- a/addons/interaction/CfgVehicles.hpp +++ b/addons/interaction/CfgVehicles.hpp @@ -420,15 +420,11 @@ class CfgVehicles { class GVAR(anims) { class showBags { phase = 0; - // Rotate interactions with turret rotation - positions[] = { - "[0, -1.6, 0] vectorAdd ([[1, -1, 0.1], [0, 0, 1], deg (_target animationPhase 'MainTurret')] call CBA_fnc_vectRotate3D)", - "[0, -1.6, 0] vectorAdd ([[-1, -1, 0.1], [0, 0, 1], deg (_target animationPhase 'MainTurret')] call CBA_fnc_vectRotate3D)" - }; selections[] = {"vhc_bags"}; items[] = {"B_Carryall_cbr", "B_Carryall_cbr"}; name = "$STR_a3_cfgvehicleclasses_backpacks0"; text = "$STR_a3_cfgvehicleclasses_backpacks0"; + distance = 3; }; }; };