/*
	FILE: fnc_rotateRight.sqf

	Name: tbd_m119_m119_fnc_rotateRight

	Author(s):
		ilbinek

	Description:
		Rotate the M119 to the right

	Parameters:
		Nothing

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

	Public:
		No
*/

#include "..\script_component.hpp"

if (vehicle player == player) exitWith {};
if (typeOf (vehicle player) != QUOTE(TBD_M119)) exitWith {};

private _arty = vehicle player;

// Get the current animation source phase
private _currentPhase = _arty animationSourcePhase "howitzer_rotation_source";
// Edit it
_currentPhase = _currentPhase + 4;

if (_currentPhase > 1440) then {
    _currentPhase = 1440;
};

// Set the new animation source phase
_arty animateSource ["howitzer_rotation_source", _currentPhase, 30];