ACE3/addons/dragging/functions/fnc_handleKilled.sqf

21 lines
524 B
Plaintext
Raw Normal View History

2015-03-18 14:42:33 +00:00
// by commy2
#include "script_component.hpp"
private "_unit";
_unit = _this select 0;
if (_unit getVariable [QGVAR(isDragging), false]) then {
private "_draggedObject";
_draggedObject = _unit getVariable [QGVAR(draggedObject), objNull];
[_unit, _draggedObject] call FUNC(dropObject);
};
if (_unit getVariable [QGVAR(isCarrying), false]) then {
private "_carriedObject";
_carriedObject = _unit getVariable [QGVAR(carriedObject), objNull];
[_unit, _carriedObject] call FUNC(dropObject_carry);
};