Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions addons/cargo/functions/fnc_paradropItem.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,26 @@ if (_item isEqualType objNull) then {

// Create smoke effect when crate landed
[{
(_this select 0) params ["_object"];
params ["_object", "_pfhID"];

if (isNull _object) exitWith {
[_this select 1] call CBA_fnc_removePerFrameHandler;
_pfhID call CBA_fnc_removePerFrameHandler;
};

if (getPos _object select 2 < 1) exitWith {
[_this select 1] call CBA_fnc_removePerFrameHandler;
_pfhID call CBA_fnc_removePerFrameHandler;

// Reenable UAV crew
private _UAVCrew = _object getVariable [QGVAR(isUAV), []];

if (_UAVCrew isNotEqualTo []) then {
// Reenable AI
{
[_x, false] call EFUNC(common,disableAiUAV);
} forEach _UAVCrew;

_object setVariable [QGVAR(isUAV), nil, true];
};

if ((GVAR(disableParadropEffectsClasstypes) findIf {_object isKindOf _x}) == -1) then {
private _smoke = "SmokeshellYellow" createVehicle [0, 0, 0];
Expand Down