Only force Animation for FFV Cargo Seats

This commit is contained in:
PabstMirror 2015-08-20 23:58:06 -05:00
parent 645e8a63ef
commit 51a8cb7974
3 changed files with 20 additions and 14 deletions

View File

@ -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[] = {};
};

View File

@ -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);
};

View File

@ -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);