From 9cce08f1521384b37a9d185a0a5cae875029c8b8 Mon Sep 17 00:00:00 2001 From: jonpas Date: Tue, 12 Sep 2017 00:33:58 +0200 Subject: [PATCH] Move handle on carrier doors (#5498) --- addons/interaction/XEH_postInit.sqf | 2 +- addons/interaction/functions/fnc_openDoor.sqf | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/addons/interaction/XEH_postInit.sqf b/addons/interaction/XEH_postInit.sqf index 67800c2618..fc0571ba4c 100644 --- a/addons/interaction/XEH_postInit.sqf +++ b/addons/interaction/XEH_postInit.sqf @@ -83,7 +83,7 @@ GVAR(isOpeningDoor) = false; call EFUNC(interaction,openDoor); true }, { - //Probably don't want any condidtions here, so variable never gets locked down + //Probably don't want any conditions here, so variable never gets locked down // Statement GVAR(isOpeningDoor) = false; true diff --git a/addons/interaction/functions/fnc_openDoor.sqf b/addons/interaction/functions/fnc_openDoor.sqf index 7d94a5c4a1..2457bc1f39 100644 --- a/addons/interaction/functions/fnc_openDoor.sqf +++ b/addons/interaction/functions/fnc_openDoor.sqf @@ -31,7 +31,7 @@ if (_animations isEqualTo []) exitWith {}; private _lockedVariable = format ["bis_disabled_%1", _door]; -//Check if the door can be locked aka have locked variable, otherwhise cant lock it +// Check if the door can be locked aka have locked variable, otherwhise cant lock it if ((_house animationPhase (_animations select 0) <= 0) && {_house getVariable [_lockedVariable, 0] == 1}) exitWith { private _lockedAnimation = format ["%1_locked_source", _door]; TRACE_3("locked",_house,_lockedAnimation,isClass (configfile >> "CfgVehicles" >> (typeOf _house) >> "AnimationSources" >> _lockedAnimation)); @@ -41,6 +41,13 @@ if ((_house animationPhase (_animations select 0) <= 0) && {_house getVariable [ }; }; +// Add handle on carrier +if (typeOf _house == "Land_Carrier_01_island_01_F") then { + private _handle = format ["door_handle_%1_rot_1", (_animations select 0) select [5, 1]]; + TRACE_1("carrier handle",_handle); + _animations pushBack _handle; +}; + playSound "ACE_Sound_Click"; // @todo replace with smth. more fitting GVAR(doorTargetPhase) = _house animationPhase (_animations select 0);