class CfgVehicles
{
	class AllVehicles;
	class Air : AllVehicles {
		class NewTurret;	// External class reference
		class ViewPilot;	// External class reference
	};
	
	class Helicopter : Air {
		class HitHull;	// External class reference
		class HitEngine;	// External class reference
		class HitAvionics;	// External class reference
		class HitVRotor;	// External class reference
		class HitHRotor;	// External class reference
		class HitMissiles;	// External class reference
		class HitRGlass;	// External class reference
		class HitLGlass;	// External class reference
		
		// internal camera viewing limitations
		class ViewPilot;
		
		class Turrets {
			class MainTurret : NewTurret {
				class HitTurret;	// External class reference
				class HitGun;	// External class reference
			};
		};
		class AnimationSources;	// External class reference
		
		//class EventHandlers ;
	};
	
	class CWR_ah64Helicopter : Helicopter {
                  
        //ejectDamageLimit = 1;	
		//minFireTime = 10; 
		//ejectDeadDriver = true;
		//ejectDeadCargo = true;
		simulation = "helicopter";
		insideSoundCoef = 0.085;	
		occludeSoundsWhenIn = 0.6;
		obstructSoundsWhenIn = 0.2;
		vehicleClass="CWR_Air";
		selectionHRotorStill = "mainrotor_static";
		selectionHRotorMove = "mainrotor_blur";
		selectionVRotorStill = "tailrotor_static";
		selectionVRotorMove = "tailrotor_blur";
		memoryPointLMissile = "Missile_1";
		memoryPointRMissile = "Missile_2";
		memoryPointLRocket = "Rocket_1";
		memoryPointRRocket = "Rocket_2";
		selectionFireAnim = "muzzleflash";
		unitInfoType = "UnitInfoHelicopter";
		crew = "SoldierWPilot";
		scope = protected;
		side = TWest;
		displayName = "";
		nameSound = "apache";
		accuracy = 0.03;	// accuracy needed to recognize type of this target
		driverAction = "AH64_Pilot";
		crewVulnerable = false;
		maxSpeed = 279;	// max speed on level road, km/h
		typicalCargo[] = {"SoldierWPilot", "SoldierWPilot"};
		soundGetIn[] = {"\ca\air\Data\Sound\heli_door1", 0.1, 1};
		soundGetOut[] = {"\ca\air\Data\Sound\heli_door1", 0.1, 1};
		soundEngine[] = {"\cwr\cwr_vehicles\cwr_air\cwr_rotw\data\sounds\ah64", 27, 1};
		soundDammage[] = {"\\cwr\cwr_vehicles\cwr_air\cwr_rotw\data\sounds\alarmah64", 0.5, 1};
		armor = 55;
		damageResistance = 0.00593;
		cost = 10000000;
		model = "\cwr\cwr_vehicles\cwr_air\cwr_rotw\CWR_ah64";
		picture = "\cwr\cwr_vehicles\cwr_air\cwr_rotw\data\ico\ah64_ca.paa";
		mapSize = 13;
		Icon = "\cwr\cwr_vehicles\cwr_air\cwr_rotw\data\map_ico\ah64map_ca.paa";
		memoryPointsGetInDriver = "pos_driver";
		memoryPointsGetInDriverDir = "pos_driver_dir";
		//laserScanner = true;
		weapons[] = {};
		magazines[] = {};
		
		class ViewPilot : ViewPilot {
			initFov = 1.3;
			minFov = 0.8;
			maxFov = 1.3;
			initAngleX = 10;
			minAngleX = -75;
			maxAngleX = 85;
			initAngleY = 0;
			minAngleY = -150;
			maxAngleY = 150;
		};
			   
		class Turrets : Turrets {
			class MainTurret : MainTurret {			    
				gunnerAction = "AH64_Gunner";
				gunnerInAction = "AH64_Gunner";
				primary = true;
				castGunnerShadow = true;
				viewGunnerShadow = true;
				memoryPointsGetInGunner = "pos_gunner";
				memoryPointsGetInGunnerDir = "pos_gunner_dir";
				memoryPointGun = "machinegun";
				gunBeg = "muzzle";	// endpoint of the gun
				gunEnd = "chamber";	
				gunnerForceOptics = false;
				initElev = 11;
				minElev = -60;
				maxElev = 11;
				minTurn = -60;
				maxTurn = 60;
				initTurn = 0;
				initFov = 0.6;
				minFov = 0.1;
				maxFov = 1.0;
				
				
				gunnerOpticsModel = "\ca\air\optika_AH1Z";
				//ejectDeadGunner = true;
				
				class HitTurret {
					armor = 0.3;
					material = 51;
					name = "m230_base";
					visual = "m230_base";
					passThrough = false;
				};
				class HitGun {
					armor = 0.4;
					material = 51;
					name = "m230";
					visual = "m230";
					passThrough = 0;
				};
				class ViewOptics 
				{ 
				  initAngleX = 0;
				  minAngleX = -60;
				  maxAngleX = 60;
				  initAngleY = 0;
				  minAngleY = -100;
				  maxAngleY = 100;
				  initFov = 0.7;
				  minFov = 0.03; // zoom in
				  maxFov = 0.75; // zoom out, > 0.80? is fish eye lens
				};
					
			};
		};
		
		// threat (VSoft, VArmor, VAir), how threatening vehicle is to unit types
		threat[] = {0.3, 1, 0.8};

		selectionDamage = "body";
		armorStructural = 4.0;
		class HitHull {
			armor = 1.2;
			material = 51;
			name = "hull";
			visual = "des_body";
			passThrough = 1;
		};
		class HitEngine {
			armor = 0.7;
			material = 51;
			name = "engine";
			visual = "engine";
			passThrough = 1;
		};
		class HitAvionics {
			armor = 0.4;
			material = 51;
			name = "electronics";
			visual = "electronics";
			passThrough = 0;
		};
		class HitVRotor {
			armor = 0.3;
			material = 52;
			name = "tailrotor";
			visual = "tailrotor";
			passThrough = 0;
		};
		class HitHRotor {
			armor = 0.2;
			material = 52;
			name = "mainrotor";
			visual = "mainrotor";
			passThrough = 0;
		};
		class HitRGlass {
			armor = 0.7;
			material = 54;
			name = "sklo predni P";
			visual = "sklo predni P";
			passThrough = 0;
		};	
		class HitLGlass {
			armor = 0.7;
			material = 54;
			name = "sklo predni L";
			visual = "sklo predni L";
			passThrough = 0;
		};
		class HitMissiles {
			armor = 0.5;
			material = 52;
			name = "missiles";
			visual = "missiles";
			passThrough = 0;
		};
		
		class AnimationSources : AnimationSources {
			
		};
		
		
		class Library {
			libTextDesc = $STR_LIB_AH64;
		};
		dammageHalf[] = {"\cwr\cwr_vehicles\cwr_air\cwr_rotw\data\ah64_glass_ca.paa", "\cwr\cwr_vehicles\cwr_air\cwr_rotw\data\destruct\ah64_glass_full_ca.paa", "\cwr\cwr_vehicles\cwr_air\cwr_rotw\data\ah64_glass_ca.paa", "\cwr\cwr_vehicles\cwr_air\cwr_rotw\data\destruct\ah64_glass_full_ca.paa"};
		dammageFull[] = {"\cwr\cwr_vehicles\cwr_air\cwr_rotw\data\ah64_glass_ca.paa", "\cwr\cwr_vehicles\cwr_air\cwr_rotw\data\destruct\ah64_glass_full_ca.paa", "\cwr\cwr_vehicles\cwr_air\cwr_rotw\data\ah64_glass_ca.paa", "\cwr\cwr_vehicles\cwr_air\cwr_rotw\data\destruct\ah64_glass_full_ca.paa"};
		
		class Damage {
			tex[] = {};
			mat[] = {"cwr\cwr_vehicles\cwr_air\cwr_rotw\data\ah64_body.rvmat","cwr\cwr_vehicles\cwr_air\cwr_rotw\data\ah64_body.rvmat","cwr\cwr_vehicles\cwr_air\cwr_rotw\data\destruct\ah64_body_destruct.rvmat",
					 "cwr\cwr_vehicles\cwr_air\cwr_rotw\data\ah64_gear.rvmat","cwr\cwr_vehicles\cwr_air\cwr_rotw\data\ah64_gear.rvmat","cwr\cwr_vehicles\cwr_air\cwr_rotw\data\destruct\ah64_gear_destruct.rvmat",
					 "cwr\cwr_vehicles\cwr_air\cwr_rotw\data\ah64_tads.rvmat","cwr\cwr_vehicles\cwr_air\cwr_rotw\data\ah64_tads.rvmat","cwr\cwr_vehicles\cwr_air\cwr_rotw\data\destruct\ah64_tads_destruct.rvmat",
					 "cwr\cwr_vehicles\cwr_air\cwr_rotw\data\ah64_rotors.rvmat","cwr\cwr_vehicles\cwr_air\cwr_rotw\data\ah64_rotors.rvmat","cwr\cwr_vehicles\cwr_air\cwr_rotw\data\destruct\ah64_rotors_destruct.rvmat",
					 "cwr\cwr_vehicles\cwr_air\cwr_rotw\data\ah64_cpg_cockpit_ext.rvmat","cwr\cwr_vehicles\cwr_air\cwr_rotw\data\ah64_cpg_cockpit_ext.rvmat","cwr\cwr_vehicles\cwr_air\cwr_rotw\data\destruct\ah64_cpgcockpitext_destruct.rvmat",
					 "cwr\cwr_vehicles\cwr_air\cwr_rotw\data\ah64_pilot_cockpit_ext.rvmat","cwr\cwr_vehicles\cwr_air\cwr_rotw\data\ah64_pilot_cockpit_ext.rvmat","cwr\cwr_vehicles\cwr_air\cwr_rotw\data\destruct\ah64_pilotcockpitext_destruct.rvmat",
					 "cwr\cwr_vehicles\cwr_air\cwr_rotw\data\ah64_cockpit_misc.rvmat","cwr\cwr_vehicles\cwr_air\cwr_rotw\data\ah64_cockpit_misc.rvmat","cwr\cwr_vehicles\cwr_air\cwr_rotw\data\destruct\ah64_cockpitmisc_destruct.rvmat",
					 "cwr\cwr_vehicles\cwr_air\cwr_rotw\data\ah64_panels_low_ext.rvmat","cwr\cwr_vehicles\cwr_air\cwr_rotw\data\ah64_panels_low_ext.rvmat","cwr\cwr_vehicles\cwr_air\cwr_rotw\data\destruct\ah64_panelslowext_destruct.rvmat",
					 "cwr\cwr_vehicles\cwr_air\cwr_rotw\data\ah64_cpg_cockpit.rvmat","cwr\cwr_vehicles\cwr_air\cwr_rotw\data\ah64_cpg_cockpit.rvmat","cwr\cwr_vehicles\cwr_air\cwr_rotw\data\destruct\ah64_cpgcockpit_destruct.rvmat",
					 "cwr\cwr_vehicles\cwr_air\cwr_rotw\data\ah64_pilot_cockpit.rvmat","cwr\cwr_vehicles\cwr_air\cwr_rotw\data\ah64_pilot_cockpit.rvmat","cwr\cwr_vehicles\cwr_air\cwr_rotw\data\destruct\ah64_pilotcockpit_destruct.rvmat",
					 "cwr\cwr_vehicles\cwr_air\cwr_rotw\data\ah64_pilot_panels.rvmat","cwr\cwr_vehicles\cwr_air\cwr_rotw\data\ah64_pilot_panels.rvmat","cwr\cwr_vehicles\cwr_air\cwr_rotw\data\destruct\ah64_pilotpanels_destruct.rvmat",
					 "cwr\cwr_vehicles\cwr_air\cwr_rotw\data\ah64_cpg_panels.rvmat","cwr\cwr_vehicles\cwr_air\cwr_rotw\data\ah64_cpg_panels.rvmat","cwr\cwr_vehicles\cwr_air\cwr_rotw\data\destruct\ah64_cpgpanels_destruct.rvmat",
					 "cwr\cwr_vehicles\cwr_air\cwr_rotw\data\ah64_rocket_pods.rvmat","cwr\cwr_vehicles\cwr_air\cwr_rotw\data\ah64_rocket_pods.rvmat","cwr\cwr_vehicles\cwr_air\cwr_rotw\data\destruct\ah64_rocket_pods_destruct.rvmat"};
		};
		
		
		class Reflectors {
			class Right {
				color[] = {0.8, 0.8, 1.0, 1.0};
				ambient[] = {0.07, 0.07, 0.07, 1.0};
				position = "P svetlo";
				direction = "konec P svetla";
				hitpoint = "P svetlo";
				selection = "P svetlo";
				size = 1;
				brightness = 1.0;
			};
		};

		class MarkerLights {
			//class FormLight_Green {
			//	name = "zeleny pozicni";
				//color[] = {1.0, 0.1, 0.1, 1};
			//	color[] = {0.0, 1.0, 0, 1};
			//	ambient[] = {0.1, 0.01, 0.01, 1};
			//	brightness = 0.01;
			//	blinking = false;
			//};	
			class NavLight_Green {
				name = "zeleny pozicni";
				//color[] = {1.0, 0.1, 0.1, 1};
				color[] = {0.0, 1.0, 0, 1};
				ambient[] = {0.1, 0.01, 0.01, 1};
				brightness = 0.01;
				blinking = false;
			};	
			class NavLight_Red {
				name = "cerveny pozicni";
				//color[] = {1.0, 0.1, 0.1, 1};
				color[] = {1.0, 0.0, 0, 1};
				ambient[] = {0.1, 0.01, 0.01, 1};
				brightness = 0.01;
				blinking = false;
			};	
			class FlashLight_White {
				//pisw foss
				name = "bily pozicni blik";
				//color[] = {1.0, 0.1, 0.1, 1};
				color[] = {1.0, 1.0, 1.0, 1};
				ambient[] = {0.1, 0.01, 0.01, 1};
				brightness = 0.01;
				blinking = true;
			};	
		};
		
	};

	class ah64 : CWR_ah64Helicopter {
		scope = public;
		displayName = $STR_DN_AH64;
		
		class Turrets : Turrets {
			class MainTurret : MainTurret {
				weapons[] = {"M197", "FFARLauncher", "HellfireLauncher"};
				magazines[] = {"750Rnd_M197_AH1", "38Rnd_FFAR", "8Rnd_Hellfire"};
			};
		};
		
	};
	
};