mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
af61c2bc50
Gear is no longer used and can be removed from fthe function parameters
31 lines
1.1 KiB
Plaintext
31 lines
1.1 KiB
Plaintext
/*
|
|
* Author: joko // Jonas
|
|
* Add the Reserve Parachute to Units or Save Backpack if is a Parachute in Unit
|
|
*
|
|
* Arguments:
|
|
* None
|
|
*
|
|
* Return Value:
|
|
* 0: Unit
|
|
*
|
|
* Example:
|
|
* None
|
|
*
|
|
* Public: No
|
|
*/
|
|
#include "script_component.hpp"
|
|
|
|
params ["_unit"];
|
|
private _backpack = backpack _unit;
|
|
|
|
if ((vehicle _unit) isKindOf "ParachuteBase" && {backpack _unit == ""} && {!(_unit getVariable [QGVAR(chuteIsCut),false])} && {_unit getVariable [QGVAR(hasReserve),false]}) then {
|
|
_unit addBackpackGlobal (_unit getVariable[QGVAR(backpackClass),"ACE_NonSteerableParachute"]);
|
|
} else {
|
|
if ((getNumber(configFile >> "CfgVehicles" >> _backpack >> "ace_hasReserveParachute")) == 1) then {
|
|
_unit setVariable[QGVAR(backpackClass),getText(configFile >> "CfgVehicles" >> _backpack >> "ace_reserveParachute"),true];
|
|
};
|
|
if (!(_unit getVariable [QGVAR(chuteIsCut),false]) && {!(animationState _unit == 'para_pilot')}) then {
|
|
_unit setVariable [QGVAR(hasReserve),[false,true] select (getNumber(configFile >> "CfgVehicles" >> _backpack >> "ace_hasReserveParachute")),true];
|
|
};
|
|
};
|