class CfgSkeletons
{
	class amf_614_skeleton
	{
		pivotsModel="";
		isDiscrete = 0;
		skeletonInherit = "";
		skeletonBones[] =
		{
			"trigger",		"", /// not in this model, but good to use
			"bolt",			"",
			"bolt_catch",	"",
			"magazine",		"",
			"safety",		"",
			"muzzleFlash",	"",
			"OP",			"",
			"ForeSight",	"",
			"BackSight",	"",
			"rail_protect_side",	"",
			"rail_protect_underbarrel",	""
		};
	};
	class AMF_Bipod_614_skeleton
	{
		pivotsModel="";
		isDiscrete = 0;
		skeletonInherit = "";
		skeletonBones[] =
		{
			"bipod_legs",		"",
			"bipod_leg_L",		"bipod_legs",
				"leg_L",		"bipod_leg_L",
			"bipod_leg_R",		"bipod_legs",
				"leg_R",		"bipod_leg_R"
		};
	};	
};
class CfgModels
{
	class Default
	{
		sectionsInherit="";
		sections[] = {};
		skeletonName = "";
	};
	class Optic: Default
	{
		sections[]=
		{
			"zasleh"
		};
	};
	class Weapon: Default
	{
		sections[]=
		{
			"zasleh"
		};

		htMin = 1;		// Minimum half-cooling time (in seconds)
		htMax = 600;	// Maximum half-cooling time (in seconds)
		afMax = 0;		// Maximum temperature in case the model is alive (in celsius)
		mfMax = 0;		// Maximum temperature when the model is moving (in celsius)
		mFact = 1;		// Metabolism factor - number from interval <0, 1> (0 - metabolism has no influence, 1 - metabolism has full influence (no other temperature source will be considered)).
		tBody = 100;	 // Metabolism temperature of the model (in celsius)

		// skeletonName="Weapon";
		class Animations
		{
			class zaslehROT
			{
				type="rotation";
				source="clockMinute";
				sourceAddress="loop";
				selection="zasleh";
				begin="usti hlavne";
				end="konec hlavne";
				memory=1;
				minValue=0.0166665;
				maxValue=0.016666666666666666666666666666667;
				angle0="rad 0";
				angle1="rad 360";
			};
			class magazine_hide
			{
				type="hide";
				source="reloadMagazine";
				sourceAddress="mirror";
				selection="magazine";
				minValue=0.0;
				maxValue=0.4;
				hideValue=0.5;
			};
			class reload_ammobelt_hide: magazine_hide
			{
				selection="ammo_belt";
			};
			class reload_ammobelt_bottom_hide: magazine_hide
			{
				selection="ammo_belt_bottom";
			};
			class ammobelt_hide: magazine_hide
			{
				source="isEmpty";
				selection="ammo_belt";
				minValue=0.000000;
				maxValue=1.000000;
				hideValue=1.000000;
			};
			class ammobelt_bottom_hide: ammobelt_hide
			{
				selection="ammo_belt_bottom";
			};
			/// Hiding of magazine if weapon has none
			class no_magazine
			{
				type="hide";
				source="hasMagazine";
				selection="magazine";
				minValue=0.000000;
				maxValue=1.00000;
				hideValue=0.5;
				unhideValue = -1.0;
			};				
		};
	};
	class Rifle: Weapon
	{
		// skeletonName="Rifle";
		class Animations: Animations
		{
			class magazine_hide:magazine_hide
			{
				sourceAddress="mirror";
				minValue=0.0;
				maxValue=0.56;
				hideValue=0.36;
			};
			class bolt_empty
			{
				type="translation";
				source="isEmpty";
				selection="bolt";
				axis="bolt_axis";
				memory=1;
				minValue=0.000000;
				maxValue=0.500000;
				offset0=0;
				offset1=0.5;
			};
			class bullet_cover
			{
				type="rotation";
				source="reload";
				sourceAddress="mirror";
				selection="bullet_cover";
				axis="bullet_cover_axis";
				memory=1;
				minValue=0.0;
				maxValue=0.5;
				angle0=0;
				angle1=-0.4;
			};
			class bolt_fire_begin
			{
				type="translation";
				source="reload";
				selection="bolt";
				axis="bolt_axis";
				memory=1;
				minValue=0.000000;
				maxValue=0.300000;
				offset0=0;
				offset1=0.5;
			};
			class bolt_fire_end:bolt_fire_begin
			{
				minValue=0.500000;
				maxValue=1.000000;
				offset0=0;
				offset1=-0.5;
			};
			class bolt_reload_begin
			{
				type="translation";
				source="reloadMagazine";
				selection="bolt";
				axis="bolt_axis";
				memory=1;
				minValue=0.1;
				maxValue=0.15;
				offset0=0;
				offset1=0.5;
			};
			class bolt_reload_end:bolt_reload_begin
			{
				minValue=0.980000;
				maxValue=1.000000;
				offset0=0;
				offset1=-0.5;
			};
		};
	};
	class amf_614_long_Base: Rifle
	{
		skeletonName = "amf_614_skeleton";
		sectionsInherit = "";
		sections[] = {"muzzleFlash","Camo1","Camo2","camo3","camo4","Camo5","Camo6","Camo7","Camo8","Camo9"};
		class Animations
		{
			class trigger /// not in this model, but good to use
			{
				type = "rotation";
				source = "reload";
				sourceAddress = "clamp";
				selection = "trigger";
				axis = "trigger_axis";
				minValue = 0;
				maxValue = "1";
				angle0 = "0";
				angle1 = "rad -30";
			};
			
			class bolt
			{
				type = "translation";
				source = "reload";
				sourceAddress = clamp;
				selection = "bolt";
				axis = "bolt_axis";
				minValue = 0.5;
				maxValue = 1;
				offset0 = 0;
				offset1 = 0.3;
			};
			class bolt_2: bolt
			{
				minValue = 0;
				maxValue = 0.5;
				offset0 = 0;
				offset1 = 0.7;
			};
			class bolt_empty: bolt{
				source = "isEmptyNoReload";
				minValue = 0;
				maxValue = 1;
				offset0 = 0;
				offset1 = 1;
			};
			class bolt_reload_move_1: bolt_empty {
				source="reloadMagazine";	// z: should work like that only if weapon is empty
				minValue=0;
				maxValue=0.00001;
			};
			class bolt_reload_move_2: bolt_reload_move_1 {
				source="reloadMagazine";	// z: should work like that only if weapon is empty
				minValue=0.78;
				maxValue=0.80;
				offset1 = -1;
			};
			class bolt_catch: bolt {
				selection = "bolt_catch";
				axis = "bolt_catch_axis";
			};
			class bolt_catch_2: bolt_2 {
				selection = "bolt_catch";
				axis = "bolt_catch_axis";
			};
			class bolt_catch_empty: bolt_empty {
				selection = "bolt_catch";
				axis = "bolt_catch_axis";
			};
			class bolt_catch_reload_move_1: bolt_reload_move_1 {
				selection = "bolt_catch";
				axis = "bolt_catch_axis";
			};
			class bolt_catch_reload_move_2: bolt_reload_move_2 {
				selection = "bolt_catch";
				axis = "bolt_catch_axis";
			};
			class magazine_hide
			{
				type="hide";
				source="reloadMagazine";
				selection="magazine";
				minValue=0.000000;
				maxValue=1.00000;
				hideValue=0.188;
				unhideValue = 0.550;
			};
			class no_magazine
			{
				type="hide";
				source="hasMagazine";
				selection="magazine";
				minValue=0.000000;
				maxValue=1.00000;
				hideValue=0.5;
				unhideValue = -1.0;
			};
			class magazine_reload_move_1
			{
				type = "translation";
				source = "reloadMagazine";
				selection = "magazine";
				axis = "magazine_axis";
				minValue = 0.145;
				maxValue = 0.170;
				offset0 = 0.0;
				offset1 = 0.5;
			};
			class magazine_reload_move_2: magazine_reload_move_1
			{
				minValue = 0.573;
				maxValue = 0.602;
				offset0 = 0.0;
				offset1 = -0.5;
			};

			class muzzleFlashROT
			{
				type="rotationX";
				source="ammoRandom";      //use ammo count as phase for animation
				sourceAddress="loop";     //loop when phase out of bounds
				selection="muzzleFlash";  //selection we want to rotate
				axis="";                  //no own axis - center of rotation is computed from selection
				centerFirstVertex=true;   //use first vertex of selection as center of rotation
				minValue=0;
				maxValue=4;               //rotation angle will be 360/4 = 90 degrees
				angle0="rad 0";
				angle1="rad 360";
			};
			class OP_ROT
			{
				type="rotation";
				source="zeroing2";    // use second muzzle zeroing for rotation
				sourceAddress="loop"; // loop when phase out of bounds
				selection="OP";       // selection we want to rotate
				axis="OP_axis";       // has its own axis
				minValue=0;
				maxValue=3;
				angle0="rad 0";
				angle1="rad 65";
			};
			class BackSight_optic
			{
				type="rotation";
				source="hasOptics";
				selection="BackSight";
				axis="BackSight_axis";
				memory=1;
				minValue=0.0000000;
				maxValue=1.0000000;
				angle0=0.000000;
				angle1=(rad 90);
			};
			class ForeSight_optic: BackSight_optic
			{
				selection="ForeSight";
				axis="ForeSight_axis";
				angle1=(rad 90);
			};

		// Rotation of fire mode switch
			class safety_mode_rot
			{
				type			= rotation;
				source			= weaponMode;
				selection		= "safety";
				axis			= "safety_axis";
				memory			= 1;
				minValue		= 0;
				maxValue		= 0.25;
				angle0			= 0;
				angle1			= (rad -90);
			};
			class rail_protect1
			{
				type="hide";
				source="hasUnderbarrel";
				selection="rail_protect_underbarrel";
				minValue = 0;
				maxValue = 1;
				hideValue = 1;
				// unHideValue = 0.5;
				animPeriod = 0.0;
				initPhase = 0.0;
			};				
			class rail_protect2
			{
				type="hide";
				source="hasAccessory";
				selection="rail_protect_side";
				minValue = 0;
				maxValue = 1;
				hideValue = 1;
				// unHideValue = 0.5;
				animPeriod = 0.0;
				initPhase = 0.0;
			};					
		};
	};
	class AMF_416_long: amf_614_long_Base {};
	class AMF_416_short: amf_614_long_Base {};
};