ACE3/addons/parachute/functions/fnc_doLanding.sqf

34 lines
745 B
Plaintext
Raw Normal View History

/*
* 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"
2016-07-12 14:16:01 +00:00
params ["_unit"];
2015-02-02 21:58:24 +00:00
GVAR(PFH) = false;
2016-07-12 14:16:01 +00:00
2015-02-02 21:58:24 +00:00
[_unit, "AmovPercMevaSrasWrflDf_AmovPknlMstpSrasWrflDnon", 2] call EFUNC(common,doAnimation);
2016-07-12 14:16:01 +00:00
_unit setVariable [QGVAR(chuteIsCut), false, true];
2016-07-12 14:16:01 +00:00
2015-02-02 21:58:24 +00:00
[{
2016-07-12 14:28:36 +00:00
(_this select 0) params ["_time", "_unit"];
2016-07-12 14:16:01 +00:00
if (CBA_missionTime > _time + 1) then {
[_unit, "Crouch"] call EFUNC(common,doGesture);
[_this select 1] call CALLSTACK(CBA_fnc_removePerFrameHandler);
};
2016-07-12 14:16:01 +00:00
}, 1, [CBA_missionTime, _unit]] call CALLSTACK(CBA_fnc_addPerFrameHandler);