ACE3/addons/parachute/functions/fnc_doLanding.sqf
Joko a74bc3a748 Merge branch 'master' of https://github.com/acemod/ACE3 into acemod-master
Conflicts:
	AUTHORS.txt
	addons/parachute/CfgVehicles.hpp
2015-07-01 02:49:29 +02:00

28 lines
723 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];
[{
if (ACE_time >= ((_this select 0) select 0) + 1) then {
((_this select 0) select 1) playActionNow "Crouch";
[(_this select 1)] call CALLSTACK(cba_fnc_removePerFrameHandler);
};
}, 1, [ACE_time,_unit]] call CALLSTACK(cba_fnc_addPerFrameHandler);