Skip to content

Commit

Permalink
Update fnc_unload.sqf
Browse files Browse the repository at this point in the history
  • Loading branch information
johnb432 committed Jul 22, 2024
1 parent 8ea8771 commit b70aafa
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions addons/cargo/functions/fnc_unload.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,18 @@ if (_object isEqualType objNull) then {
[QEGVAR(zeus,addObjects), [[_object], _objectCurators]] call CBA_fnc_serverEvent;
};

// 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];
};

private _cargoNet = _object getVariable [QGVAR(cargoNet), objNull];

// Delete cargo net if no items remain on it
Expand Down

0 comments on commit b70aafa

Please sign in to comment.