From 7f07d4e4b8cf0de15fdb2aebde68837a25af3c0b Mon Sep 17 00:00:00 2001 From: commy2 Date: Sun, 25 Sep 2016 09:45:55 +0200 Subject: [PATCH] fix broken parachutes, fix #4437 (#4462) --- addons/cargo/functions/fnc_paradropItem.sqf | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/addons/cargo/functions/fnc_paradropItem.sqf b/addons/cargo/functions/fnc_paradropItem.sqf index 7631cdf21f..283d32345e 100644 --- a/addons/cargo/functions/fnc_paradropItem.sqf +++ b/addons/cargo/functions/fnc_paradropItem.sqf @@ -57,13 +57,16 @@ _newItem setVelocity ((velocity _vehicle) vectorAdd ((vectorNormalized (vectorDi if (isNull _item || {getPos _item select 2 < 1}) exitWith {}; - private _itemPosASL = getPosASL _item; - private _itemVelocity = velocity _item; private _parachute = createVehicle ["B_Parachute_02_F", [0,0,0], [], 0, "CAN_COLLIDE"]; - _item attachTo [_parachute, [0,0,0.2]]; - _parachute setPosASL _itemPosASL; - _parachute setVelocity _itemVelocity; + // cannot use setPos on parachutes without them closing down + _parachute attachTo [_item, [0,0,0]]; + detach _parachute; + + private _velocity = velocity _item; + + _item attachTo [_parachute, [0,0,-1]]; + _parachute setVelocity _velocity; private _light = "Chemlight_yellow" createVehicle [0,0,0]; _light attachTo [_item, [0,0,0]];