From 5fef1ba3847a9334ffc848cbef44540eec27fcd2 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sat, 25 Jun 2016 12:03:44 +0200 Subject: [PATCH 1/2] Change use backpack command for backpack classname Uses the backpack command to retrieve the classname of a unit's backpack instead of a select. Fixes incorrect index. --- addons/parachute/functions/fnc_storeParachute.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/parachute/functions/fnc_storeParachute.sqf b/addons/parachute/functions/fnc_storeParachute.sqf index c20cf8375d..295b05d0e1 100644 --- a/addons/parachute/functions/fnc_storeParachute.sqf +++ b/addons/parachute/functions/fnc_storeParachute.sqf @@ -17,7 +17,7 @@ #include "script_component.hpp" params ["_unit", "_gear"]; -private _backpack = _gear param [6, ""]; +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"]); From af61c2bc5025dccef719c7ca22ce511ef6196aef Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sat, 25 Jun 2016 12:23:07 +0200 Subject: [PATCH 2/2] Remove unused parameter Gear is no longer used and can be removed from fthe function parameters --- addons/parachute/functions/fnc_storeParachute.sqf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/parachute/functions/fnc_storeParachute.sqf b/addons/parachute/functions/fnc_storeParachute.sqf index 295b05d0e1..8980a8ff82 100644 --- a/addons/parachute/functions/fnc_storeParachute.sqf +++ b/addons/parachute/functions/fnc_storeParachute.sqf @@ -7,7 +7,6 @@ * * Return Value: * 0: Unit - * 1: getAllGear-Array * * Example: * None @@ -16,7 +15,7 @@ */ #include "script_component.hpp" -params ["_unit", "_gear"]; +params ["_unit"]; private _backpack = backpack _unit; if ((vehicle _unit) isKindOf "ParachuteBase" && {backpack _unit == ""} && {!(_unit getVariable [QGVAR(chuteIsCut),false])} && {_unit getVariable [QGVAR(hasReserve),false]}) then {