class vurtual_gmv_base: vurtual_hmmwv_base_armored {
	sectionsInherit="vurtual_hmmwv_base_armored";
	sections[]= {
		"muzzleflash2",
		"dmg_tailgate"
	};
	class Animations: Animations {
		class door_left_window: door_left_window {
			axis = "window_axis";
		};
		class door_right_window: door_right_window {
			axis = "window_axis";
		};
		class door_left2_window: door_left2_window {
			axis = "window_axis";
		};
		class door_right2_window: door_right2_window {
			axis = "window_axis";
		};
		class armor_tailgate_hide: door_hide {
			selection = "armor_tailgate";
			source = "armor_tailgate_hide";
		};
		class rails_base_hide: door_hide {
			selection = "rails_base";
			source = "rails_base_hide";
		};
		class rails_rear_unhide {
			type = "hide";
			source = "armor_cargo_hide";
			selection = "rails_rear";
			minValue = 0;
			maxValue = 1;
			hideValue = 0;
			unhideValue = 0.1;
		};
		class tailgate_rack_hide: door_hide {
			selection = "tailgate_rack";
			source = "tailgate_rack_hide";
		};
		class tailgate_l_destruct: door_left_destruct { selection = "tailgate_left"; source = "HitATailgate" };
		class tailgate_r_destruct: tailgate_l_destruct { selection = "tailgate_right";};


		//class tailgate_l_destruct_a: door_left_destruct_a { selection = "tailgate_left_a"; source = "HitATailgate" };
		//class tailgate_r_destruct_a: tailgate_l_destruct { selection = "tailgate_right_a";};
	
		//class tailgate_l_destruct_dmg: tailgate_l_destruct_a { selection = "tailgate_left_dmg"; hideValue = 0; unhideValue = 0.5; };
		//class tailgate_r_destruct_dmg: tailgate_r_destruct_a { selection = "tailgate_right_dmg"; hideValue = 0; unhideValue = 0.5; };

		
		class damageHideHlaven2:damageHide {
			selection="OtocHlaven2_shake";
		};

		class m240_transported: turret_transported {
			selection = "m240_arm";
		};
		class bags_transported: turret_transported {
			selection = "gmv_hide_bags";
		};
		class gmv_hide_ammo: gmv_hide_radio {
			selection = "gmv_hide_ammo";
			source = "gmv_hide_ammo";
		};
		class gmv_hide_bags: gmv_hide_radio {
			selection = "gmv_hide_bags";
			source = "gmv_hide_bags";
		};
		class gmv_hide_weapon1: gmv_hide_radio {
			selection = "gmv_hide_weapon1";
			source = "gmv_hide_weapon1";
		};
		class gmv_hide_weapon2: gmv_hide_radio {
			selection = "gmv_hide_weapon2";
			source = "gmv_hide_weapon2";
		};
		class m240_arm_swing {
			type = "rotation";
			source = "m240_arm_swing";
			selection = "m240_arm";
			axis = "m240_arm_axis";
			minValue = 0;
			maxValue = 1;
			angle0 = 0;
			angle1 = "rad 180";
		};
		class m240_arm_swing_back: m240_arm_swing {
			angle1 = "rad -180";
			selection = "OtocVez_2";
			axis = "osaVeze_2";
		};

		class SideTurret
		{
			type="rotationY";
			source="SideTurret";
			selection="OtocVez_2";
			axis="OsaVeze_2";
			animPeriod=0;
			minValue="rad -360";
			maxValue="rad 0";
			angle0="rad -360";
			angle1="rad 0";
		};
		class SideTurretGunner: SideTurret {
			selection="OtocVezGunner_2";
		};
		
		//Left aim
		
		class SideTurretSwing: SideTurret { //Swing the lower arm at twice the angle to bring the gun around the hood.
			axis = "m240_arm_axis";
			selection = "M240_arm";
			minValue = "rad 0";
			maxValue = "rad +360";
			angle0 = "0";
			angle1 = "rad +360*2"; //double swing angle
		};

		class SideTurretGunnerSwing: SideTurretSwing { //Do the same for the view, but only for 5 degrees, until the sights are too far.
			selection = "m240_arm_gunner";
			maxValue = "rad +5";
			angle1 = "rad +5*2";
		};
		class SideTurretCounterSwing: SideTurret { //Rotate the upper arm the opposite angle to keep the gun aimed.
			minValue = "rad 0";
			maxValue = "rad +360";
			angle0 = "rad 0";
			angle1 = "rad -360";
		};
		class SideTurretGunnerCounterSwing: SideTurretCounterSwing { //Match the above with the view.
			selection = "OtocVezGunner_2";
			maxValue = "rad +5";
			angle1 = "rad -5";
		};
		class SideTurretGunnerReturnSwing: SideTurretGunner { //Past 5 degrees, resume normal view swing angle.
			minValue = "rad +5";
			maxValue = "rad +360";
			angle0 = "rad 0";
			angle1 = "rad +355";
		};
		
		
		//Right aim
		class SideTurretBackSwing: SideTurret { //Rotate the lower arm to clear the vehicle body.
			axis = "m240_arm_axis";
			selection = "M240_arm";
			minValue = "rad -360";
			maxValue = "rad -170"; //Kick in at 170deg
			angle0 = "rad +190";
			angle1 = "0";
		};
		class SideTurretGunnerBackSwing: SideTurretBackSwing {
			selection = "m240_arm_gunner";
		};
		class SideTurretBackCounterSwing: SideTurret { //Double up rotation animation to keep gun aimed.
			minValue = "rad -360";
			maxValue = "rad -170"; //Kick in at 170deg
			angle0 = "rad -190";
			angle1 = "0";
			
		};
		class SideTurretGunnerBCS: SideTurretBackCounterSwing {
			selection = "OtocVezGunner_2";
		};
		
		
		
		class SideGun: SideTurret
		{
			type="rotationX";
			source="SideGun";
			minValue = "rad -360";
			maxValue = "rad +360";
			angle0 = "rad -360";
			angle1 = "rad +360";
			selection="OtocHlaven_2";
			axis="OsaHlavne_2";
		};
		class SideGunGunner: SideGun {
			selection="OtocHlavenGunner_2";
		};
		class Magazine_hide_240 {
			type="hide";
			source="reloadMagazine2";
			sourceAddress="clamp";
			selection="magazine2";
			minValue=0.0;
			maxValue=1;
			hideValue=0.25;
			unhideValue=0.8;
		};
		class ammobelt_hide_240: Magazine_hide_240 {
			hideValue=0.2;
			unhideValue=1.1;
			selection="ammo_belt2";
		};
		class Feedtray_cover_up_240
		{
			type="rotation";
			source="reloadMagazine2";
			selection="feedtray_cover2";
			axis="feedtray_cover_axis2";
			memory=1;
			minValue=0.1000000;
			maxValue=0.130000;
			angle0=0.000000;
			angle1=-1.570796;
		};
		class Feedtray_cover_down_240:feedtray_cover_up_240
		{
			minValue=0.860000;
			maxValue=0.900000;
			angle0=0.000000;
			angle1=1.570796;
		};
		class ammo_belt_rotation_240
		{
			type="rotationZ";
			source="ReloadAnim2";
			selection="ammo_belt2";
			axis="ammo_belt2_axis";
			memory=1;
			sourceAddress="loop";
			minValue=0.000000;
			maxValue=1.0000;
			angle0=0.000000;
			angle1=-0.209440;
		};
		class ammo_belt_load_240: ammo_belt_rotation_240 {
			source="reloadMagazine2";
			sourceAddress="clamp";
			minValue=0.05;
			maxValue=0.07;
		};
		class ammo_belt_load_pre_240: ammo_belt_load_240 {
			minValue=0.04999;
			maxValue=0.05;
			angle1=0.209440;
		};
		class Bolt_reload_begin_240:ammo_belt_rotation_240
		{
			selection="Bolt2";
			axis="ammo_belt2_axis";
			type="translation";
			sourceAddress="clamp";
			source="reloadMagazine2";
			minValue=0.00000;
			maxValue=0.0200000;
			offset0=0;
			offset1=-0.25;
		};
		class Bolt_reload_end_240:bolt_reload_begin_240
		{
			minValue=0.050000;
			maxValue=0.070000;
			offset0=0;
			offset1=+0.25;
		};
		class Bolt_recoil_240
		{
			type="translation";
			selection="bolt2";
			source="ReloadAnim2";
			axis="ammo_belt2_axis";
			memory=1;
			sourceAddress="mirror";
			minValue=0;
			maxValue=0.45;
			offset0=0;
			offset1=-0.2;
		};
		class Turret_shake_240:ammo_belt_rotation_240
		{
			type="translation";
			sourceAddress="mirror";
			selection="OtocHlaven2_Shake";
			axis="osaveze_2";
			offset0=0;
			offset1=-0.002;
			minValue=0.0;
			maxValue=0.05;
		};
		class Turret_shake_aside_240:Turret_shake_240
		{
			axis="osahlavne_2";
			maxValue=0.05*1.3;
			offset0=0;
			offset1=-0.02;
		};
		class tailgate_left_fold {
			type = "rotation";
			source = "tailgate_fold";
			axis = "tailgate_left_axis";
			selection = "tailgate_left";
			minValue = 0;
			maxValue = 1;
			angle0 = 0;
			angle1 = "rad -90";
		};
		class tailgate_right_fold: tailgate_left_fold {
			axis = "tailgate_right_axis";
			selection = "tailgate_right";
			angle1 = "rad 90";
		};
			
		BULLET_HIDE_GOOD(001a,1,8,100)
		BULLET_HIDE_GOOD(002a,2,8,100)
		BULLET_HIDE_GOOD(003a,3,8,100)
		BULLET_HIDE_GOOD(004a,4,8,100)
		BULLET_HIDE_GOOD(005a,5,8,100)
		BULLET_HIDE_GOOD(006a,6,8,100)
		BULLET_HIDE_GOOD(007a,7,8,100)
		BULLET_HIDE_GOOD(008a,8,8,100)
	};
};