From 51a8cb79749f2a89aa4ad6cb511bbba01c6ec637 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Thu, 20 Aug 2015 23:58:06 -0500 Subject: [PATCH] Only force Animation for FFV Cargo Seats --- addons/captives/CfgMoves.hpp | 2 +- .../captives/functions/fnc_setHandcuffed.sqf | 21 +++++++------------ .../functions/fnc_vehicleCaptiveMoveIn.sqf | 11 ++++++++++ 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/addons/captives/CfgMoves.hpp b/addons/captives/CfgMoves.hpp index 6c0bfc3ce9..161fcce9a4 100644 --- a/addons/captives/CfgMoves.hpp +++ b/addons/captives/CfgMoves.hpp @@ -64,7 +64,7 @@ class CfgMovesMaleSdr: CfgMovesBasic { class ACE_HandcuffedFFV: ACE_AmovPercMstpScapWnonDnon { file = "\A3\cargoposes_F_heli\anim\passenger_flatground_3idleunarmed.rtm"; actions = "ACE_CivilHandCuffedFFVActions"; - ConnectTo[] = {"ACE_AmovPercMstpScapWnonDnon",0.1}; + ConnectTo[] = {}; }; diff --git a/addons/captives/functions/fnc_setHandcuffed.sqf b/addons/captives/functions/fnc_setHandcuffed.sqf index e1f06e2b61..c4bde3a839 100644 --- a/addons/captives/functions/fnc_setHandcuffed.sqf +++ b/addons/captives/functions/fnc_setHandcuffed.sqf @@ -67,20 +67,15 @@ if (_state) then { }; } else { - // _turretPath = []; - // { - // _x params ["_xUnit", "", "", "_xTurretPath"]; - // if (_unit == _xUnit) exitWith {_turretPath = _xTurretPath}; - // } forEach (fullCrew (vehicle _unit)); - // TRACE_1("turret Path",_turretPath); - // if (_turretPath isEqualTo []) exitWith {}; - // _turretConfig = [(configFile >> "CfgVehicles" >> (typeOf (vehicle _unit))), _turretPath] call EFUNC(common,getTurretConfigPath); - // _gunnerAction = getText (_turretConfig >> "gunnerAction"); - // TRACE_1("reseting to",_gunnerAction); - // [_unit, "ACE_HandcuffedFFV", 2] call EFUNC(common,doAnimation); - // [_unit, "ACE_AmovPercMstpScapWnonDnon", 1] call EFUNC(common,doAnimation); - + _turretPath = []; + { + _x params ["_xUnit", "", "", "_xTurretPath"]; + if (_unit == _xUnit) exitWith {_turretPath = _xTurretPath}; + } forEach (fullCrew (vehicle _unit)); + TRACE_1("turret Path",_turretPath); + if (_turretPath isEqualTo []) exitWith {}; + TRACE_1("Handcuff (FFV) animation interrupted",_newAnimation); [_unit, "ACE_HandcuffedFFV", 2] call EFUNC(common,doAnimation); [_unit, "ACE_HandcuffedFFV", 1] call EFUNC(common,doAnimation); }; diff --git a/addons/captives/functions/fnc_vehicleCaptiveMoveIn.sqf b/addons/captives/functions/fnc_vehicleCaptiveMoveIn.sqf index cb1c2fd37a..959bbd71b9 100644 --- a/addons/captives/functions/fnc_vehicleCaptiveMoveIn.sqf +++ b/addons/captives/functions/fnc_vehicleCaptiveMoveIn.sqf @@ -31,5 +31,16 @@ _target assignAsCargo _vehicle; _cargoIndex = _vehicle getCargoIndex _target; _target setVariable [QGVAR(CargoIndex), _cargoIndex, true]; +//Check if is a FFV turret: +_turretPath = []; +{ + _x params ["_xUnit", "", "", "_xTurretPath"]; + if (_target == _xUnit) exitWith {_turretPath = _xTurretPath}; +} forEach (fullCrew (vehicle _target)); +TRACE_1("turret Path",_turretPath); +if (_turretPath isEqualTo []) exitWith {}; + +TRACE_1("Setting FFV Animation",_newAnimation); + [_target, "ACE_HandcuffedFFV", 2] call EFUNC(common,doAnimation); [_target, "ACE_HandcuffedFFV", 1] call EFUNC(common,doAnimation);