class vurtual_hmmwvtrailer_base: Car_F {
	driveOnComponent[] = {"chocks"};
	antiRollbarForceCoef = 12;
	antiRollbarForceLimit = 10;
	antiRollbarSpeedMin = 20;
	editorSubcategory = "EdSubCat_hmmwv";
	antiRollbarSpeedMax = 50;
	camouflage = 1;
	class AnimationSources: AnimationSources {
		class wheel_towed {
			source = "user";
			initPhase = 0;
			animPeriod = 1;
		};
	};
	side = 1;
	faction = BLU_F;
	class Turrets: Turrets {};
	slingLoadCargoMemoryPoints[] = { "SlingLoadCargo1","SlingLoadCargo2","SlingLoadCargo3","SlingLoadCargo4"};
	class VehicleTransport {
		class Cargo {
			dimensions[]				= {"VTV_Cargo_Base","VTV_Cargo_Corner"};
			parachuteClass				= "B_Parachute_02_F";
			canBeTransported            = 1;
			parachuteHeightLimit		= 5;
		};
	};
	brakeIdleSpeed = 0.1;
	fuelCapacity = 0;
	explosionShielding = 0.8;
	simulation = "carx";
	dampersBumpCoef = 6.0;
	differentialType = "all_open";
	frontRearSplit = 0.5;
	frontBias = 1.3;
	rearBias = 1.3;
	centreBias = 1.3;
	clutchStrength = 20.0;
	dampingRateFullThrottle = 0.1;
	dampingRateZeroThrottleClutchEngaged = 0.1;
	dampingRateZeroThrottleClutchDisengaged = 0.1;
	armor = 100;
	terrainCoef = 1.5;
	wheelDamageThreshold = 0.7;
	wheelDestroyThreshold = 0.99;
	wheelDamageRadiusCoef = 0.95;
	wheelDestroyRadiusCoef = 0.45;
	wheelCircumference = 2.834;
	numberPhysicalWheels = 3;
	hasDriver = false;
	maxFordingDepth=3;
	vurtual_trailer_fold = 0;
	class Wheels {
		class LF {
			boneName = "wheel_1_1";
			steering = 0;
			side = "left";
			center = "wheel_1_1_axis";
			boundary = "wheel_1_1_bound";
			width = 0.126;
			mass = 70;
			MOI = 12.8;
			dampingRate = 0.1;
			dampingRateDamaged = 5;
			dampingRateDestroyed = 1000;
			maxBrakeTorque = 0;
			maxHandBrakeTorque = 0;
			suspTravelDirection[] = {0, -1, 0};
			suspForceAppPointOffset = "wheel_1_1_axis";
			tireForceAppPointOffset = "wheel_1_1_axis";
			maxCompression = 0.05;
			mMaxDroop = 0.1;
			WHEEL_SPRINGS(2300,2,WHEEL_STRENGTH,WHEEL_DAMPER*0.9)
			longitudinalStiffnessPerUnitGravity = 8000;
			latStiffX = 25;
			latStiffY = 180;
			frictionVsSlipGraph[] = {{0, 1}, {0.5, 1}, {1, 1}};
		};
		class RF: LF {
			boneName = "wheel_2_1";
			center = "wheel_2_1_axis";
			boundary = "wheel_2_1_bound";
			suspForceAppPointOffset = "wheel_2_1_axis";
			tireForceAppPointOffset = "wheel_2_1_axis";
			steering = 0;
			side = "right";
		};
		class Mid: LF {
			boneName = "wheel_mid";
			center = "wheel_mid_axis";
			boundary = "wheel_mid_bound";
			suspForceAppPointOffset = "tow_pintle";
			tireForceAppPointOffset = "tow_pintle";
			longitudinalStiffnessPerUnitGravity = 1;
			WHEEL_SPRINGS(190,1,WHEEL_STRENGTH*20,WHEEL_DAMPER)
			latStiffX = 25;
			latStiffY = 18;
		};
	};
	class EventHandlers: EventHandlers {
		init = "[_this select 0] call vurtual_m998_fnc_trailer";
		class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers_base {};
	};
	class HitPoints : HitPoints {
		class HitHull: HitHull {
			armorComponent = "hit_hull";
			name = "hit_hull_p";
			depends = "Total-0.1";
			armor = 999;
			passThrough = 0;
			explosionShielding = 0;
			minimalHit = 0;
			visual = "-";
		};
		class HitBody: HitBody {
			armor = -1200;
			explosionShielding = 0.2;
			passThrough = 0.2;
			name = "karoserie";
			armorComponent = "hit_body";
			radius = 0.15;
		};

		
		class HitLFWheel: HitLFWheel {
			armor = -300;
			explosionShielding = 4;
			minimalHit = 0.0167;
			name = "hit_wheel_1_1_p";
			armorComponent = "wheel_1_1_hide";
			
		};
		class HitRFWheel: HitRFWheel {
			armor = -300;
			explosionShielding = 4;
			minimalHit = 0.0167;
			name = "hit_wheel_2_1_p";
			armorComponent = "wheel_2_1_hide";
		};
	};

};
class vurtual_ltt_chassis: vurtual_hmmwvtrailer_base {
	scope = 2;
	radarType = 2;
	showAllTargets = 2;
	displayName = "LTT Trailer Chassis";
	driverCompartments = "Compartment2";
	model = "\vurtual_m998_trailer\vurtual_ltt_chassis.p3d";
	transportSoldier = 1;
	hiddenSelections[] = {"Camo"};
	hiddenSelectionsTextures[] = {"\vurtual_m998\Data\hmmwv_body_canvas_1_co.paa"};
	class textureSources {
		class woodland_old {
			displayname = "Woodland (Worn)";
			author = "vurtual";
			textures[] = {"\vurtual_m998\Data\hmmwv_body_canvas_1_wl_co.paa"};
			factions[] = {};
		};
		class green {
			displayname = "Green";
			author = "vurtual";
			textures[] = {"\vurtual_m998\Data\hmmwv_body_canvas_1_green_co.paa"};
			factions[] = {};
		};
		class desert {
			displayname = "Desert";
			author = "vurtual";
			textures[] = {"\vurtual_m998\Data\hmmwv_body_canvas_1_co.paa"};
			factions[] = {};
		};
	};
	editorForceEmpty = 1;
	crew = "C_man_1";
	hasGunner = false;
	class Damage {
		tex[] = {};
		mat[] = {
			"vurtual_m998\Data\hmmwv_body_1.rvmat",
			"vurtual_m998\Data\hmmwv_body_damage.rvmat",
			"vurtual_m998\Data\hmmwv_body_destruct.rvmat"
		};
	};
};
class vurtual_radar_sentinel_base: vurtual_hmmwvtrailer_base {
	scope = 0;
	crew = "B_UAV_AI_F";
	hasDriver = 1;
	hasGunner = 0;
	editorForceEmpty = 0;
	forceHideDriver = 1;
	icon = "\A3\Static_F_Sams\Radar_System_01\Data\UI\Radar_System_01_icon_CA.paa";
	nameSound = "veh_vehicle_truck_s";
	displayName = "AN/MPQ-64 Sentinel [BLUFOR]";
	unitInfoType = "RscUnitInfoStaticNoWeapon";
	driverCompartments = "Compartment2";
	isUav=1;
	memoryPointDriverOptics = "driverview";
	driverForceOptics = 1;
	driverOpticsModel = "\vurtual_m998\optika_black.p3d";
	uavCameraDriverDir = "driverview_dir";
	uavCameraDriverPos = "driverview";
	model = "\vurtual_m998_trailer\vurtual_radar_sentinel.p3d";
	memoryPointDriverOptics="driverview";
	transportSoldier = 0;
	vurtual_trailer_fold = 1;
	receiveRemoteTargets = 1;
	reportRemoteTargets = 1;
	showAllTargets = 2;
	threat[] = {0,0.3,1};
	hiddenSelections[] = {"Camo","Camo2"};
	//weapons[] = {"FakeWeapon"};
	//magazines[] = {"FakeWeapon"};
	hiddenSelectionsTextures[] = {
		"\vurtual_m998\Data\hmmwv_body_canvas_1_co.paa",
		"\vurtual_m998\data\hmmwv_regular_1_co.paa"
	};
	class PilotCamera {
			controllable = 1;
			maxElev = 70;
			minElev = -10;
			maxTurn = 360;
			minTurn = -360;
			initFov = 1;
			minFov = 1;
			maxFov = 1;
			//body = "driverTurret";
			//gun = "driverGun";
			//animationSourceBody = "driverTurret";
			//animationSourceGun = "driverGun";
	};
	class textureSources {
		class woodland_old {
			displayname = "Woodland (Worn)";
			author = "vurtual";
			textures[] = {
				"\vurtual_m998\Data\hmmwv_body_canvas_1_wl_co.paa",
				"\vurtual_m998\data\hmmwv_regular_wl_1_co.paa"
			};
			factions[] = {};
		};
		class green {
			displayname = "Green";
			author = "vurtual";
			textures[] = {
				"\vurtual_m998\Data\hmmwv_body_canvas_1_green_co.paa",
				"\vurtual_m998\data\hmmwv_regular_1_green_co.paa"
			};
			factions[] = {};
		};
		class desert {
			displayname = "Desert";
			author = "vurtual";
			textures[] = {
				"\vurtual_m998\Data\hmmwv_body_canvas_1_co.paa",
				"\vurtual_m998\data\hmmwv_regular_1_co.paa"
			};
			factions[] = {};
		};
	};
	class AnimationSources: AnimationSources {
		class m119_folded {
			source = "user";
			initPhase = 0;
			animPeriod = 1;
		};
		class m119_fold_garage {
			source = "user";
			initPhase = 0;
			animPeriod = 1;
			onPhaseChanged = "_this call vurtual_m998_fnc_radar_fold";
			displayName = "Fold Radar";
		};
	};
	class Components: Components {
		class VehicleSystemsDisplayManagerLeft: DefaultVehicleSystemsDisplayManagerLeftSensors {
			class Components: Components {
				class SensorDisplay: SensorDisplay {
					range[] = {8000,4000,2000,1000};
				};
			};
		};
		class VehicleSystemsDisplayManagerRight: VehicleSystemsDisplayManagerLeft {
			x = "(profilenamespace getvariable [""IGUI_GRID_CUSTOMINFORIGHT_X"",	((safezoneX + safezoneW) - (		(10 * 			(			((safezoneW / safezoneH) min 1.2) / 40)) + 0.5 * 			(			((safezoneW / safezoneH) min 1.2) / 40)))])";
			left = 0;
			right = 1;
			defaultDisplay = "SensorDisplay";
		};
		class SensorsManagerComponent {
			class Components {
				class ActiveRadarSensorComponent: SensorTemplateActiveRadar {
					sensorPosition = "pos_radar";
					angleRangeHorizontal = 360;
					angleRangeVertical = 65;
					aimDown = -20;
					class AirTarget {
						minRange = 7500;
						maxRange = 7500;
						objectDistanceLimitCoef = -1;
						viewDistanceLimitCoef = -1;
					};
					class GroundTarget {
						minRange = 4500;
						maxRange = 4500;
						objectDistanceLimitCoef = -1;
						viewDistanceLimitCoef = -1;
					};
					maxTrackableSpeed = 1388.89;
					typeRecognitionDistance = 4500;
				};
				class PassiveRadarComponent: SensorTemplatePassiveRadar {
					sensorPosition = "pos_radar";
					angleRangeHorizontal = 360;
					angleRangeVertical = 65;
					aimDown = -20;
					class AirTarget {
						minRange = 7500;
						maxRange = 7500;
						objectDistanceLimitCoef = -1;
						viewDistanceLimitCoef = -1;
					};
					class GroundTarget: AirTarget {};
					maxTrackableSpeed = 1388.89;
					typeRecognitionDistance = 4500;
				};
				class DataLinkSensorComponent: SensorTemplateDataLink {};
					
			};
		};
	};
	class Turrets: Turrets {
		class MainTurret: MainTurret {
			gunnerName = "Radar Operator";
			gunnerCompartments = "Compartment1";
			dontCreateAI = 1;
			gunnerOpticsModel = "\vurtual_m998\optika_tow.p3d";
			turretInfoType="vurtual_rscTurretInfoRadar";
			usePip = 2;
			showAllTargets = 2;
			gunnerForceOptics = 1;
			weapons[] = {"FakeWeapon"};
			maxElev = 70;
			minElev = -10;
			maxTurn = 360;
			minTurn = -360;
			body = "mainTurret";
			gun = "mainGun";
			animationSourceBody = "mainTurret";
			animationSourceGun = "mainGun";
			//weapons[] = {"FakeWeapon"};
			//magazines[] = {"FakeWeapon"};
			gunnerAction = "driver_boat01";
			class Components {
				class VehicleSystemsDisplayManagerLeft: DefaultVehicleSystemsDisplayManagerLeftSensors {
					class Components: Components {
						class SensorDisplay: SensorDisplay {
							range[] = {8000,4000,2000,1000};
						};
					};
				};
				class VehicleSystemsDisplayManagerRight: VehicleSystemsDisplayManagerLeft {
					x = "(profilenamespace getvariable [""IGUI_GRID_CUSTOMINFORIGHT_X"",	((safezoneX + safezoneW) - (		(10 * 			(			((safezoneW / safezoneH) min 1.2) / 40)) + 0.5 * 			(			((safezoneW / safezoneH) min 1.2) / 40)))])";
					left = 0;
					right = 1;
					defaultDisplay = "SensorDisplay";
				};
			};
		};
	};
};
//BLUFOR AI
class vurtual_radar_sentinel_B: vurtual_radar_sentinel_base {
	crew = "B_UAV_AI_F";
	side = 1;
	faction = "BLU_F";
	scope = 2;
	displayName = "AN/MPQ-64 Sentinel [BLUFOR]";
};
//INDFOR AI
class vurtual_radar_sentinel_I: vurtual_radar_sentinel_base {
	crew = "I_UAV_AI_F";
	side = 2;
	faction = "IND_F";
	scope = 2;
	displayName = "AN/MPQ-64 Sentinel [INDFOR]";
};
//OPFOR AI
class vurtual_radar_sentinel_O: vurtual_radar_sentinel_base {
	crew = "O_UAV_AI_F";
	scope = 2;
	side = 0;
	faction = "OPF_F";
	displayName = "AN/MPQ-64 Sentinel [OPFOR]";
};
class vurtual_m1102: vurtual_hmmwvtrailer_base {
	scope = 2;
	displayName = "M1102 Trailer";
	model = "\vurtual_m998_trailer\vurtual_m1102.p3d";
	transportSoldier = 1;
	hiddenSelections[] = {"Camo"};
	hiddenSelectionsTextures[] = {"\vurtual_m998\Data\hmmwv_body_canvas_1_co.paa"};
	class textureSources {
		class woodland_old {
			displayname = "Woodland (Worn)";
			author = "vurtual";
			textures[] = {"\vurtual_m998\Data\hmmwv_body_canvas_1_wl_co.paa"};
			factions[] = {};
		};
		class green {
			displayname = "Green";
			author = "vurtual";
			textures[] = {"\vurtual_m998\Data\hmmwv_body_canvas_1_green_co.paa"};
			factions[] = {};
		};
		class desert {
			displayname = "Desert";
			author = "vurtual";
			textures[] = {"\vurtual_m998\Data\hmmwv_body_canvas_1_co.paa"};
			factions[] = {};
		};
	};
	class AnimationSources: AnimationSources {
		class tailgate_fold {
			source = "door";
			initPhase = 0;
			animPeriod = 0.5;
			onPhaseChanged = "(_this select 0) animateDoor ['tailgate_fold',(_this select 1),true]";
			displayName = "Fold Tailgate";
		};
		class blackout_hide {
			//displayName = "Turn blackout lights off";
			source = "user";
			initPhase = 1;
			animPeriod = 0.01;
			forceAnimatePhase = 0;
			forceAnimate[] = {"brakelight_normal_hide",1};
		};
		class brakelight_normal_hide {
			//displayName = "Turn normal brake lights off";
			source = "user";
			initPhase = 0;
			animPeriod = 0.01;
			forceAnimatePhase = 0;
			forceAnimate[] = {"blackout_hide",1};
		};
	};
	editorForceEmpty = 1;
	crew = "C_man_1";
	class VehicleTransport: VehicleTransport {
		class Carrier {
			cargoBayDimensions[]        = {"VTV_Carrier_Base", "VTV_Carrier_Corner"};
			cargoSpacing[]              = {0, 0, 0};
			cargoAlignment[]            = {"right","front"};
			maxLoadMass                 = 1200;
			disableHeightLimit			= 1;
			exits[]						= {"VTV_exit_1"};
			unloadingInterval			= 2;
			loadingDistance				= 0;
			loadingAngle				= 0;
			parachuteClassDefault       = "B_Parachute_02_F";
			parachuteHeightLimitDefault = 5;
		};
	};
	hasGunner = false;
	class Damage {
		tex[] = {};
		mat[] = {
			"vurtual_m998\Data\hmmwv_body_1.rvmat",
			"vurtual_m998\Data\hmmwv_body_damage.rvmat",
			"vurtual_m998\Data\hmmwv_body_destruct.rvmat"
		};
	};
};
class vurtual_m119_base: vurtual_hmmwvtrailer_base {
	vurtual_trailer_fold = 1;
	class Wheels: Wheels {
		class LF: LF {
			WHEEL_SPRINGS(2300,2,WHEEL_STRENGTH,WHEEL_DAMPER*0.9)
		};
		class RF: RF {
			WHEEL_SPRINGS(2300,2,WHEEL_STRENGTH,WHEEL_DAMPER*0.9)
		};
		class Mid: Mid {
			WHEEL_SPRINGS(2300,2,WHEEL_STRENGTH*20,WHEEL_DAMPER)
		};
	};
	icon = "iconStaticCannon";

	//test
	weapons[] = {"FakeWeapon"};
	magazines[] = {"FakeWeapon"};
	unloadInCombat = 0;
	threat[] = {0.8,0.8,0};
	textSingular = "static weapon";
	textPlural = "static weapons";
	precision = 1;
	nameSound = "veh_static_s";
	irTarget = 0;
	
	side = 1;
	faction = "BLU_F";
	crew = "B_Soldier_F";
	displayName="M119";
	unitInfoType = "RscUnitInfoMortar";

	//sound[]={"Ca\sounds\Weapons\cannon\gun120",db40,1,1800};
	//reloadMagazineSound[]={"Ca\sounds\Weapons\cannon\gun120reload",db-30,1,40};
	model="\vurtual_m998_trailer\vurtual_m119.p3d";
	//picture="\ca\Weapons\data\ico\M119_CA.paa";
	mapSize = 7;
	//icon= "\Ca\weapons\Data\map_ico\icomap_m119_CA.paa";
	transportSoldier = 0;
	hasGunner = 1;
	class Turrets: Turrets {
		class MainTurret: MainTurret {
			stabilizedInAxes = 3;
			maxelev = 80;
			//turretInfoType = "RscWeaponRangeArtillery";
			turretInfoType="vurtual_rscTurretInfoM119";
			maxHorizontalRotSpeed = 0.5;
			maxVerticalRotSpeed = 0.5;
			//turretInfoType = "RscOptics_MBT_01_gunner";
			weapons[]={"vurtual_cannon_m119"};
			gunnerAction = "vurtual_m119_gunner";
			magazines[]={"vurtual_12Rnd_105mm_HE","vurtual_12Rnd_105mm_HE","vurtual_12Rnd_105mm_HE","vurtual_12Rnd_105mm_Smoke","vurtual_12Rnd_105mm_Smoke","vurtual_12Rnd_105mm_Flare"};
			//magazines[]={};
			//gunnerAction = "";
			gunnerOpticsModel = "vurtual_m998\optika_M119.p3d";
			gunnerOpticsEffect[] = {"OpticsCHAbera1","OpticsBlur2"};
			memoryPointsGetInGunner = "pos gunner";
			memoryPointsGetInGunnerDir = "pos gunner dir";	
			/*class ViewOptics:ViewOptics
			{
				initFov=0.085; minFov=0.085; maxFov=0.085; // 3x zoom from 50 deg FOV
			};*/
			elevationMode = 3;
			class OpticsIn {
				class Normal {
					opticsDisplayName = "W";
					initAngleX = 0;
					minAngleX = -30;
					maxAngleX = 30;
					initAngleY = 0;
					minAngleY = -100;
					maxAngleY = 100;
					initFov=0.085; minFov=0.085; maxFov=0.085; // 3x zoom from 50 deg FOV
					visionMode[] = {"Normal"};
					thermalMode[] = {0, 1};
					gunnerOpticsModel = "vurtual_m998\optika_M119.p3d";
					camPos="gunnerview";
				};
				class Direct: Normal {
					gunnerOpticsModel = "vurtual_m998\optika_TOW.p3d";
					camPos="gunnerview_direct";
				};
			};
			memoryPointGunnerOptics="gunnerview";
			gunBeg = "gun_muzzle";
			gunEnd = "gun_chamber";
			memoryPointGun = "gun_muzzle";
			animationSourceBody = "MainTurret";
			animationSourceGun = "MainGun";
			animationSourceCamElev = "mainOptic";
			enableManualFire = 1;
			primaryGunner = 1;
			gun = "MainGun";
			body = "MainTurret";
			//test
			cameraDir = "mainOptic";
			
		};
		/*
		class CommanderTurret: NewTurret {
			weapons[] = {};
			magazines[] = {};
			proxytype="CPCargo";
			proxyIndex=1;
			gunnerAction = "vurtual_m119_cargo";
			memoryPointGunnerOptics = "gunnerview_direct";
			gunnerOpticsEffect[] = {"OpticsCHAbera1","OpticsBlur2"};
			gunnerOpticsModel = "vurtual_m998\optika_TOW.p3d";
			class ViewOptics:ViewOptics
			{
				initFov=0.085; minFov=0.085; maxFov=0.085; // 3x zoom from 50 deg FOV
			};
			body="";
			gun="";
			animationSourceBody="";
			animationSourceGun="";
		};*/
	};
	class AnimationSources: AnimationSources {
		class MainTurret_back {
			source = "user";
			animPeriod = 1;
			initPhase = 0;
		};
		class MainGun_back: MainTurret_back {};
		
		class m119_folded {
			source = "user";
			initPhase = 0;
			animPeriod = 1;
		};
		class recoil_source {
			source="reload";
			weapon="vurtual_cannon_m119";
		};
		class m119_fold_garage {
			source = "user";
			initPhase = 0;
			animPeriod = 1;
			onPhaseChanged = "_this call vurtual_m998_fnc_gun_fold";
			displayName = "Fold Gun";
		};
		
		class ammobox_hide {
			source = "user";
			initPhase = 1;
			animPeriod = 0.1;
			//displayName = "Hide ammoboxes.";
		};
	};
	/*
	class Components: Components {
		class TransportPylonsComponent {
			uiPicture = "\A3\Air_F_epb\Heli_Light_03\Data\UI\Heli_Light_03_3DEN_CA.paa";
			class pylons {
				class pylons1 {
					attachment = "vurtual_12Rnd_105mm_HE";
					hardpoints[] = {"vurtual_pylon_m119"};

					priority = 5;
					UIposition[] = {0.06,0.4};
					turret[] = {0};
				};
				PYLON_SLOT(2,10,2,"vurtual_12Rnd_105mm_HE")
				PYLON_SLOT(3,10,3,"vurtual_12Rnd_105mm_HE")
				PYLON_SLOT(4,10,4,"vurtual_12Rnd_105mm_Smoke")
				
				
				PYLON_SLOT(5,50,1,"vurtual_12Rnd_105mm_Smoke")
				PYLON_SLOT(6,50,2,"vurtual_12Rnd_105mm_Flare")
			};
		};
	};*/
};
class vurtual_m119: vurtual_m119_base {
	scope = 2;
	artilleryScanner = 1;
	availableForSupportTypes[] = {"Artillery"};
};
class vurtual_m119_direct: vurtual_m119_base {
	scope = 2;
	displayName="M119 (Manual)";
	artilleryScanner = 0;
	//ace_artillerytables_showRangeTable = 1;
	//ace_artillerytables_showGunLaying = 1;
	//availableForSupportTypes[] = {"Artillery"};
	class Turrets: Turrets {
		class MainTurret: MainTurret {
			weapons[] = {"vurtual_cannon_m119_d"};
			magazines[]={"vurtual_12Rnd_105mm_d_HE","vurtual_12Rnd_105mm_d_HE","vurtual_12Rnd_105mm_d_HE","vurtual_12Rnd_105mm_d_Smoke","vurtual_12Rnd_105mm_d_Smoke","vurtual_12Rnd_105mm_d_Flare"};
		};
	};
};
