/*
	FILE: fnc_detach.sqf

	Name: tbd_m119_m119_fnc_detach

	Author(s):
		ilbinek

	Description:
		Detach the M119 from the object

	Parameters:
		_arty	- object	- M119 to detach

	Returns:
		Nothing
	
	Examples:
		> [_arty] call tbd_m119_m119_fnc_detach;

	Public:
		No
*/

#include "..\script_component.hpp"

params ["_arty"];

_arty setVariable [QGVAR(towed), false, false];

[QGVAR(detached), [_arty], QGVAR(towJIP)] call CBA_fnc_globalEventJIP;
_arty animateSource ["rest_rotation_source", 0, 10];

detach _arty;

_pos = getPos _arty;
_pos set [2, 0];
_arty setPos _pos
