/*
	FILE: fnc_openBreech.sqf

	Name: tbd_m119_m119_fnc_openBreech

	Author(s):
		ilbinek

	Description:
		Open the M119 breech

	Parameters:
		_arty	- object	- M119 to be canCloseBreeched

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

	Public:
		No
*/

#include "..\script_component.hpp"

params ["_arty"];

if !([_arty] call FUNC(canOpenBrach)) exitWith {};

_arty animateSource ["open_breech_source", 1];
_arty animateSource ["handle_breech_source", 1];
_arty setVariable [QGVAR(breech), true, true];

if (_arty getVariable [QGVAR(fired), false]) then {
	[_arty] call FUNC(eject);
	_arty setVariable [QGVAR(fired), false, true];
};
