2020-10-04 20:39:52 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
/*
|
|
|
|
* Author: BaerMitUmlaut
|
|
|
|
* Drops a draggable / carryable clone of a dead unit.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Clone <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* Original unit.
|
|
|
|
*
|
|
|
|
* Example:
|
2020-10-05 08:35:44 +00:00
|
|
|
* [player] call ace_dragging_fnc_dropClone;
|
2020-10-04 20:39:52 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
params ["_clone"];
|
|
|
|
|
|
|
|
private _unit = _clone getVariable [QGVAR(original), objNull];
|
|
|
|
_unit setPosASL getPosASL _clone;
|
|
|
|
|
2020-10-11 18:37:59 +00:00
|
|
|
// Detach first to prevent objNull in attachedObjects
|
2020-10-04 20:39:52 +00:00
|
|
|
detach _clone;
|
|
|
|
deleteVehicle _clone;
|
|
|
|
|
|
|
|
_unit
|