diff --git a/addons/parachute/CfgEventHandlers.hpp b/addons/parachute/CfgEventHandlers.hpp index 8c7edda20f..7a1f8119ca 100644 --- a/addons/parachute/CfgEventHandlers.hpp +++ b/addons/parachute/CfgEventHandlers.hpp @@ -8,3 +8,10 @@ class Extended_PostInit_EventHandlers { init = QUOTE(call COMPILE_FILE(XEH_postInit)); }; }; +class Extended_Respawn_EventHandlers { + class CAManBase { + class ADDON { + respawn = QUOTE(call COMPILE_FILE(XEH_respawn)); + }; + }; +}; \ No newline at end of file diff --git a/addons/parachute/XEH_respawn.sqf b/addons/parachute/XEH_respawn.sqf new file mode 100644 index 0000000000..7ed3ae830a --- /dev/null +++ b/addons/parachute/XEH_respawn.sqf @@ -0,0 +1,17 @@ +/* + * Author: joko // Jonas + * Reset the parachute system. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * None + * + * Public: No + */ +#include "script_component.hpp" +SETVAR(_unit,chuteIsCuted,false); \ No newline at end of file diff --git a/addons/parachute/functions/fnc_doLanding.sqf b/addons/parachute/functions/fnc_doLanding.sqf index c5cb630876..15d8aca4a1 100644 --- a/addons/parachute/functions/fnc_doLanding.sqf +++ b/addons/parachute/functions/fnc_doLanding.sqf @@ -18,7 +18,7 @@ private ["_unit"]; _unit = _this select 0; GVAR(PFH) = false; [_unit, "AmovPercMevaSrasWrflDf_AmovPknlMstpSrasWrflDnon", 2] call EFUNC(common,doAnimation); -_unit setVariable[QGVAR(chuteIsCuted),true]; +SETVAR(_unit,chuteIsCuted,false); [{ if (time >= ((_this select 0) select 0) + 1) then { ((_this select 0) select 1) playActionNow "Crouch";