2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2015-08-09 12:53:13 +00:00
|
|
|
/*
|
|
|
|
* Author: commy2
|
2023-07-23 23:07:37 +00:00
|
|
|
* Handle death of the dragger/carrier.
|
2015-08-09 12:53:13 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Unit <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
2023-07-23 23:07:37 +00:00
|
|
|
* [player] call ace_dragging_fnc_handleKilled;
|
2015-08-09 12:53:13 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
2015-03-18 14:42:33 +00:00
|
|
|
|
2015-08-09 12:53:13 +00:00
|
|
|
params ["_unit"];
|
2016-01-28 18:52:53 +00:00
|
|
|
TRACE_1("params",_unit);
|
2015-03-18 14:42:33 +00:00
|
|
|
|
|
|
|
if (_unit getVariable [QGVAR(isDragging), false]) then {
|
2016-01-28 18:52:53 +00:00
|
|
|
private _draggedObject = _unit getVariable [QGVAR(draggedObject), objNull];
|
2015-03-18 14:42:33 +00:00
|
|
|
|
|
|
|
[_unit, _draggedObject] call FUNC(dropObject);
|
|
|
|
};
|
|
|
|
|
|
|
|
if (_unit getVariable [QGVAR(isCarrying), false]) then {
|
2016-01-28 18:52:53 +00:00
|
|
|
private _carriedObject = _unit getVariable [QGVAR(carriedObject), objNull];
|
2015-03-18 14:42:33 +00:00
|
|
|
|
|
|
|
[_unit, _carriedObject] call FUNC(dropObject_carry);
|
|
|
|
};
|