ACE3/addons/parachute/functions/fnc_doLanding.sqf
2016-03-02 11:01:39 +01:00

28 lines
743 B
Plaintext

/*
* Author: Garth 'L-H' de Wet
* Performs the landing animation fix
*
* Arguments:
* 0: unit <OBJECT>
*
* Return Value:
* None
*
* Example:
* [player] call ACE_Parachute_fnc_doLanding;
*
* Public: No
*/
#include "script_component.hpp"
private["_unit"];
_unit = _this select 0;
GVAR(PFH) = false;
[_unit, "AmovPercMevaSrasWrflDf_AmovPknlMstpSrasWrflDnon", 2] call EFUNC(common,doAnimation);
_unit setVariable [QGVAR(chuteIsCut), false, true];
[{
if (CBA_missionTime >= ((_this select 0) select 0) + 1) then {
((_this select 0) select 1) playActionNow "Crouch";
[(_this select 1)] call CALLSTACK(CBA_fnc_removePerFrameHandler);
};
}, 1, [CBA_missionTime,_unit]] call CALLSTACK(CBA_fnc_addPerFrameHandler);