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.
This commit is contained in:
Glowbal 2016-06-25 12:03:44 +02:00 committed by GitHub
parent c3710cc7f9
commit 5fef1ba384

View File

@ -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"]);