#define TEast 0
#define TWest 1
#define TGuerrila 2
#define TCivilian 3
#define TSideUnknown 4
#define TEnemy 5
#define TFriendly 6
#define TLogic 7

#define true 1
#define false 0

// type scope
#define private 0
#define protected 1
#define public 2

class CfgPatches
{
	class UO_UK85_APC
    {
      	units[] = {"UO_FV432_base","UO_FV432_W"};
        weapons[] = {"UO_GPMG_veh"};
		requiredVersion = 1.0;
		requiredAddons[] = {"CAData","CACharacters","CACharacters2","CAWeapons","CASounds","CATracked","Extended_Eventhandlers","CAWeapons_E","ace_sys_vehicledamage"};
	};
};

//External classes, because fuck me, right?
class ViewPilot;
class HeadLimits;
//Turret shit
class Turrets;
class MainTurret;
class NewTurret;
//OH COME ON!
class WeaponFireGun;	
class WeaponCloudsGun;
class WeaponCloudsMGun;

class CfgVehicles {
	class LandVehicle;
	class Tank;
	class M113_Base;
	class UO_FV432_base: M113_Base {
		accuracy = 0.4;
		ace_armor_hull[] = {{38, 38}, {44, 44}, {44, 44}, {38, 38}, {38, 38}, {29, 29}};
		ace_armor_turret[] = {{3, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3}};	
		ace_canbecargo = 0;
		ace_canbeload = 1;
		ace_cangear = 1;
		ace_canloadfront = 0;
		ace_era = 0;
		ace_minimalhit[] = {13, 30};	
		ace_nbc_protection = 1;	
		ace_p_detonation_engine = 0.5;	
		ace_p_detonation_hull = 0.8;	
		ace_p_detonation_turret = 0;	
		ace_p_fire_engine = 0.7;	
		ace_p_fire_hull = 0.7;	
		ace_p_fire_turret = 0;	
		ace_p_firedetonation = 0.5;
		ace_firepos[] = {0.5, 1.5, -1};
		ace_sa_defaultelevation = 0;
		ace_sa_defaultwindage = 0;
		ace_sa_enabled = 0;
		afmax = 200;
		armor = 109;
		armorcrash0[] = {"Ca\sounds\Vehicles\Crash\tank_vehicle_01", 0.707946, 1, 150};
		armorcrash1[] = {"Ca\sounds\Vehicles\Crash\tank_vehicle_02", 0.707946, 1, 150};
		armorcrash2[] = {"Ca\sounds\Vehicles\Crash\tank_vehicle_03", 0.707946, 1, 150};
		armorcrash3[] = {"Ca\sounds\Vehicles\Crash\tank_vehicle_04", 0.707946, 1, 150};
		audible = 6;
		
		brakedistance = 25;
		buildcrash0[] = {"Ca\sounds\Vehicles\Crash\tank_building_01", 0.707946, 1, 150};
		buildcrash1[] = {"Ca\sounds\Vehicles\Crash\tank_building_02", 0.707946, 1, 150};
		buildcrash2[] = {"Ca\sounds\Vehicles\Crash\tank_building_03", 0.707946, 1, 150};
		buildcrash3[] = {"Ca\sounds\Vehicles\Crash\tank_building_04", 0.707946, 1, 150};
		
		canfloat = 0;
		cargoAction[] = {Stryker_Cargo01,Stryker_Cargo01,Stryker_Cargo01,Stryker_Cargo01,Stryker_Cargo01,Stryker_Cargo01,Stryker_Cargo01,Stryker_Cargo01,Stryker_Cargo01, Stryker_Cargo01, M113_Cargo02};
		cargocompartments[] = {1, 1, 1, 1, 1, 1, 1, 1};
		cargogetinaction[] = {"GetInLow"};
		cargogetoutaction[] = {"GetOutLow"};
		cost = 100000;
		crewvulnerable = 1;
		
		damageresistance = 0.03249;
		damperSize = 0.2;    // max. damper amplitude
		damperForce = 1;    // larger number more stiffness dampers
		damperDamping = 0.8;
		displayname = "FV432";
		driverAction = M113_DriverOut;
		driverInAction = "M113_Driver_EP1";
		drivercansee = "2+4+8+16";
		drivercompartments = 0;
		driverForceOptics = 1;
		driverOpticsModel = "\ca\Tracked\optika_tank_driver_west";
		animationSourceHatch = "HatchDriver";
			
		fuelcapacity = 360;
		
		getinaction = "GetInHigh";
		getoutaction = "GetOutHigh";
		gunnercansee = "1+2+4+8+16";
		gunnerhasflares = 0;
		
		hascommander = 0;
		hasgunner = 1;
		hiddenSelections[] = {};
		hiddenSelectionsTextures[] = {};
		htmax = 1800;
		htmin = 60;
		
		icon = "\Ca\tracked_e\Data\ui\Icon_m113_CA.paa";
		initcargoangley = 90;
		insidesoundcoef = 0.9;
		irscanrangemax = 0;
		irscanrangemin = 0;
			
		lodturnedout = 1200;
		
		magazines[] = {};
		mapsize = 5;
		maxspeed = 52;
		mfact = 1;
		mfmax = 100;
		model = "\UO_UK85_APC\BLX_FV432_basic";
		
		nameSound="veh_TrackedAPC";
		
		outsidesoundfilter = 1;
		
		picture = "\UO_UK85_APC\data\icon_ca.paa";
		preferRoads = true;
		
		radartype = 0;
		
		scope = 0;
		smokelauncheronturret = 0;
		soundarmorcrash[] = {"ArmorCrash0", 0.25, "ArmorCrash1", 0.25, "ArmorCrash2", 0.25, "ArmorCrash3", 0.25};
		soundbuildingcrash[] = {"buildCrash0", 0.25, "buildCrash1", 0.25, "buildCrash2", 0.25, "buildCrash3", 0.25};
		
		soundEngineOffInt[] = {"ca\sounds\vehicles\Tracked\Other\int\int-tracked-stop-02.wss", 1.0, 1.0};
		soundEngineOffExt[] = {"ca\sounds\vehicles\Tracked\Other\ext\ext-tracked-stop-02.wss", 1.25893, 0.8, 400};
		
		soundEngineOnInt[] = {"ca\sounds\Vehicles\Tracked\Other\int\int-tracked-start-01", 1.0, 1.0};
		soundEngineOnExt[] = {"ca\SOUNDS\Vehicles\Tracked\Other\ext\ext-tracked-start-01", 2.51189, 1.0, 400};
		
		soundgear[] = {"", "5.62341e-005", 1};
		soundgetin[] = {"ca\SOUNDS\Vehicles\Tracked\T72\int\int-tank-diesel-door-1", 0.562341, 1};
		soundgetout[] = {"ca\SOUNDS\Vehicles\Tracked\T72\ext\ext-tank-diesel-door-1", 0.562341, 1, 60};
		soundwoodcrash[] = {"woodCrash0", 0.25, "woodCrash1", 0.25, "woodCrash2", 0.25, "woodCrash3", 0.25};
		supplyradius = 1.5;
		
		tbody = 250;
		threat[] = {0.9, 0.1, 0.5};
		tracksspeed = 3;
		transportammo = 0;
		transportmaxmagazines = 100;
		transportmaxweapons = 20;
		transportsoldier = 8;

		viewDriverShadow = 1;
		viewDriverShadowDiff = 0.05;
		viewcargoshadow = 1;
		viewcargoshadowamb = 0.5;
		viewcargoshadowdiff = 0.05;
		viewdriverinexternal = 1;
		
		weapons[] = {};
		wheelCircumference = 1.884;
		woodcrash0[] = {"Ca\sounds\Vehicles\Crash\tank_wood_01", 0.707946, 1, 150};
		woodcrash1[] = {"Ca\sounds\Vehicles\Crash\tank_wood_02", 0.707946, 1, 150};
		woodcrash2[] = {"Ca\sounds\Vehicles\Crash\tank_wood_03", 0.707946, 1, 150};
		woodcrash3[] = {"Ca\sounds\Vehicles\Crash\tank_wood_04", 0.707946, 1, 150};
		
		class SoundEvents {
		
				class AccelerationIn {
					sound[] = {"ca\sounds\Vehicles\Tracked\Other\int\int-tracked-acce-01", 1.0, 1.0};
					limit = 0.15;
					expression = "engineOn*(1-camPos)*2*gmeterZ*((speed factor[1.5, 5]) min (speed factor[5, 1.5]))";
				};
				
				class AccelerationOut {
					sound[] = {"ca\sounds\Vehicles\Tracked\Other\ext\ext-tracked-acce-01", 1.0, 1.0 700};
					limit = 0.15;
					expression = "engineOn*camPos*2*gmeterZ*((speed factor[1.5, 5]) min (speed factor[5, 1.5]))";
				};
		};
		
		class Sounds {
			class Engine {
					sound[] = {"\UO_UK85_APC\sound\m113_loop_1a.wss", 1.0, 1.0, 1000};
					frequency = "(randomizer*0.05+0.8)*rpm";
					volume = "engineOn*camPos*(rpm factor[0.4, 0.9])";
				};

				class IdleOut {
					sound[] = {"ca\sounds\Vehicles\Tracked\Other\ext\ext-tracked-idle-01", db0, 1.0, 450};
					frequency = "1";
					volume = "engineOn*camPos*(rpm factor[0.6, 0.2])";
				};
				
				class NoiseOut {
					sound[] = {"ca\sounds\Vehicles\Tracked\Other\ext\noise2", db0, 1.0, 100};
					frequency = "1";
					volume = "camPos*(angVelocity max 0.04)*(speed factor[4, 15])";
				};

			class ThreadsOutH0 {
					sound[] = {"ca\sounds\Vehicles\Tracked\Other\ext\ext_diesel_treads_hard_01", db0, 1.0, 200};
					frequency = "1";
					volume = "engineOn*camPos*(1-grass)*((rpm factor[0.3, 0.6]) min (rpm factor[0.6, 0.3]))";
				};
				
				class ThreadsOutH1 {
					sound[] = {"ca\sounds\Vehicles\Tracked\Other\ext\ext_diesel_treads_hard_02", db0, 1.0, 200};
					frequency = "1";
					volume = "engineOn*camPos*(1-grass)*((rpm factor[0.5, 0.8]) min (rpm factor[0.8, 0.5]))";
				};
				
				class ThreadsOutH2 {
					sound[] = {"ca\sounds\Vehicles\Tracked\Other\ext\ext_diesel_treads_hard_03", db0, 1.0, 200};
					frequency = "1";
					volume = "engineOn*camPos*(1-grass)*((rpm factor[0.65, 0.9]) min (rpm factor[0.9, 0.65]))";
				};
				
				class ThreadsOutH3 {
					sound[] = {"ca\sounds\Vehicles\Tracked\Other\ext\ext_diesel_treads_hard_04", db0, 1.0, 200};
					frequency = "1";
					volume = "engineOn*camPos*(1-grass)*((rpm factor[0.8, 1.2]) min (rpm factor[1.2, 0.8]))";
				};
				
				class ThreadsOutH4 {
					sound[] = {"ca\sounds\Vehicles\Tracked\Other\ext\ext_diesel_treads_hard_05", db0, 1.0, 200};
					frequency = "1";
					volume = "engineOn*camPos*(1-grass)*((rpm factor[1, 2.0]) min (rpm factor[2.0, 1]))";
				};
				
				class ThreadsOutS0 {
					sound[] = {"ca\sounds\Vehicles\Tracked\Other\ext\ext_diesel_treads_soft_01", db0, 1.0, 200};
					frequency = "1";
					volume = "engineOn*camPos*grass*((rpm factor[0.3, 0.6]) min (rpm factor[0.6, 0.3]))";
				};
				
				class ThreadsOutS1 {
					sound[] = {"ca\sounds\Vehicles\Tracked\Other\ext\ext_diesel_treads_soft_02", db0, 1.0, 200};
					frequency = "1";
					volume = "engineOn*camPos*grass*((rpm factor[0.5, 0.8]) min (rpm factor[0.8, 0.5]))";
				};
				
				class ThreadsOutS2 {
					sound[] = {"ca\sounds\Vehicles\Tracked\Other\ext\ext_diesel_treads_soft_03", db0, 1.0, 200};
					frequency = "1";
					volume = "engineOn*camPos*grass*((rpm factor[0.65, 0.9]) min (rpm factor[0.9, 0.65]))";
				};
				
				class ThreadsOutS3 {
					sound[] = {"ca\sounds\Vehicles\Tracked\Other\ext\ext_diesel_treads_soft_04", db0, 1.0, 200};
					frequency = "1";
					volume = "engineOn*camPos*grass*((rpm factor[0.8, 1.2]) min (rpm factor[1.2, 0.8]))";
				};
				
				class ThreadsOutS4 {
					sound[] = {"ca\sounds\Vehicles\Tracked\Other\ext\ext_diesel_treads_soft_05", db0, 1.0, 200};
					frequency = "1";
					volume = "engineOn*camPos*grass*((rpm factor[1, 2.0]) min (rpm factor[2.0, 1]))";
				};

				class Movement {
					sound[] = {"", 1.0, 1.0};
					frequency = "0";
					volume = "0";
				};

				class EngineIn {
					sound[] = {"ca\sounds\Vehicles\Tracked\Other\int\int-tracked-engine-02", 1.0, 1.0};
					frequency = "(randomizer*0.05+0.8)*rpm";
					volume = "engineOn*(1-camPos)*(rpm factor[0.4, 1])";
				};
				
				class IdleIn {
					sound[] = {"ca\sounds\Vehicles\Tracked\Other\int\int-tracked-idle-02", 1.0, 1.0};
					frequency = "1";
					volume = "engineOn*(1-camPos)*(rpm factor[0.6, 0.15])";
				};
				
				class NoiseIn {
					sound[] = {"ca\sounds\Vehicles\Tracked\Other\int\noise2", 0.199526, 1.0};
					frequency = "1";
					volume = "(1-camPos)*(angVelocity max 0.04)*(speed factor[4, 15])";
				};

				class ThreadsInH0 {
					sound[] = {"ca\sounds\Vehicles\Tracked\Other\int\int_diesel_treads_hard_01", db0, 1.0};
					frequency = "1";
					volume = "engineOn*(1-camPos)*(1-grass)*((rpm factor[0.3, 0.6]) min (rpm factor[0.6, 0.3]))";
				};
				
				class ThreadsInH1 {
					sound[] = {"ca\sounds\Vehicles\Tracked\Other\int\int_diesel_treads_hard_02", db0, 1.0};
					frequency = "1";
					volume = "engineOn*(1-camPos)*(1-grass)*((rpm factor[0.5, 0.8]) min (rpm factor[0.8, 0.5]))";
				};
				
				class ThreadsInH2 {
					sound[] = {"ca\sounds\Vehicles\Tracked\Other\int\int_diesel_treads_hard_03", db0, 1.0};
					frequency = "1";
					volume = "engineOn*(1-camPos)*(1-grass)*((rpm factor[0.65, 0.9]) min (rpm factor[0.9, 0.65]))";
				};
				
				class ThreadsInH3 {
					sound[] = {"ca\sounds\Vehicles\Tracked\Other\int\int_diesel_treads_hard_04", db0, 1.0};
					frequency = "1";
					volume = "engineOn*(1-camPos)*(1-grass)*((rpm factor[0.8, 1.2]) min (rpm factor[1.2, 0.8]))";
				};
				
				class ThreadsInH4 {
					sound[] = {"ca\sounds\Vehicles\Tracked\Other\int\int_diesel_treads_hard_05", db0, 1.0};
					frequency = "1";
					volume = "engineOn*(1-camPos)*(1-grass)*((rpm factor[1, 2.0]) min (rpm factor[2.0, 1]))";
				};
				
				class ThreadsInS0 {
					sound[] = {"ca\sounds\Vehicles\Tracked\Other\int\int_diesel_treads_soft_01", db0, 1.0};
					frequency = "1";
					volume = "engineOn*(1-camPos)*grass*((rpm factor[0.3, 0.6]) min (rpm factor[0.6, 0.3]))";
				};
				
				class ThreadsInS1 {
					sound[] = {"ca\sounds\Vehicles\Tracked\Other\int\int_diesel_treads_soft_02", db0, 1.0};
					frequency = "1";
					volume = "engineOn*(1-camPos)*grass*((rpm factor[0.5, 0.8]) min (rpm factor[0.8, 0.5]))";
				};
				
				class ThreadsInS2 {
					sound[] = {"ca\sounds\Vehicles\Tracked\Other\int\int_diesel_treads_soft_03", db0, 1.0};
					frequency = "1";
					volume = "engineOn*(1-camPos)*grass*((rpm factor[0.65, 0.9]) min (rpm factor[0.9, 0.65]))";
				};
				
				class ThreadsInS3 {
					sound[] = {"ca\sounds\Vehicles\Tracked\Other\int\int_diesel_treads_soft_04", db0, 1.0};
					frequency = "1";
					volume = "engineOn*(1-camPos)*grass*((rpm factor[0.8, 1.2]) min (rpm factor[1.2, 0.8]))";
				};
				
				class ThreadsInS4 {
					sound[] = {"ca\sounds\Vehicles\Tracked\Other\int\int_diesel_treads_soft_05", db0, 1.0};
					frequency = "1";
					volume = "engineOn*(1-camPos)*grass*((rpm factor[1, 2.0]) min (rpm factor[2.0, 1]))";
				};

		};
			
		class Damage {
			mat[] = {"Ca\Tracked_E\M113\Data\m113_track.rvmat", "Ca\Tracked_E\M113\Data\m113_track.rvmat", "Ca\Tracked_E\M113\Data\m113_track_destruct.rvmat", "Ca\Tracked_E\M113\Data\m113_01.rvmat", "Ca\Tracked_E\M113\Data\m113_01.rvmat", "Ca\Tracked_E\M113\Data\m113_01_destruct.rvmat", "Ca\Tracked_E\M113\Data\m113_02.rvmat", "Ca\Tracked_E\M113\Data\m113_02.rvmat", "Ca\Tracked_E\M113\Data\m113_02_destruct.rvmat", "Ca\Tracked_E\M113\Data\cargo.rvmat", "Ca\Tracked_E\M113\Data\cargo.rvmat", "Ca\Tracked_E\M113\Data\cargo_destruct.rvmat", "Ca\Ca_E\data\default.rvmat", "Ca\Ca_E\data\default.rvmat", "Ca\Ca_E\data\default_destruct.rvmat"};
			tex[] = {};
		};
		
		class Library {
			libtextdesc = "The FV432 is the armoured personnel carrier variant of the British Army's FV430 series of armoured fighting vehicles. Since its introduction in the 1960s it has been the most common variant, being used for transporting infantry on the battlefield. In the 1980s, almost 2,500 vehicles were in use, with around 1,500 now remaining in operation - mostly in supporting arms rather than front-line infantry service. It carries 8 personnel, 2 vehicle crew and is equipped with an L7 7.62 mm GPMG.";
		};
		
		class HitPoints {
			class HitHull {
				armor = 1;
				material = -1;
				name = "telo";
				visual = "telo";
				passThrough = 1;
			};
				
			class HitLTrack {
				armor = 0.15;
				material = -1;
				name = "pas_L";
				visual = "pas_L";
				passThrough = 0.2;
			};
				
			class HitRTrack {
				armor = 0.15;
				material = -1;
				name = "pas_P";
				visual = "pas_P";
				passThrough = 0.2;
			};
				
			class HitEngine {
				armor = 0.35;
				material = -1;
				name = "motor";
				visual = "motor";
				passThrough = 1;
			};
		};
		
		
		class GunFire : WeaponFireGun {};
		class GunClouds : WeaponCloudsGun {};	
		class MGunClouds : WeaponCloudsMGun {};
		class Turrets {};

		
		};

	class UO_FV432_W: UO_FV432_base {
		
		armorStructural = 2;
		crew = "UO_UK85_CW";
		displayName="FV432";
		faction = "BIS_BAF";
		hiddenSelections[] = {"num1"};
		hiddenSelectionsTextures[] = {"\UO_UK85_APC\data\432_01_co.paa"};
		initCargoAngleY=+90; // cargo viewing limitations	
		model = "\UO_UK85_APC\BLX_FV432_basic";
		nameSound="veh_TrackedAPC";	
		side = 1;
		scope = 2;
		soundGetIn[]={\ca\Tracked\Data\Sound\metal_door2,db-40,1};
		soundGetOut[]={\ca\Tracked\Data\Sound\metal_door2,db-40,1};
		soundEnviron[]={\ca\Tracked\Data\Sound\M1A1_treads3,db17,0.8};
		soundEngine[]={\ca\Tracked\Data\Sound\m113_loop_1a,db18,1};
		soundCrash[]={\ca\Tracked\Data\Sound\crash2,db20,1};
		soundGear[]={\ca\Tracked\Data\Sound\Gear_Trans1,db-60,1};	
		typicalCargo[]={USMC_Soldier,USMC_Soldier,USMC_Soldier,USMC_Soldier};
		threat[]={0.5, 0.1, 0.1};
		vehicleclass = "ArmouredW";
		viewGunnerShadow = 1;
		viewGunnerShadowDiff = 0.05;

		class Reflectors {
			class LeftLight {
				color[] = {0.8, 0.8, 1.0, 1.0};
				ambient[] = {0.07, 0.07, 0.07, 1.0};
				position = "L svetlo";
				direction = "konec L svetla";
				hitpoint = "L svetlo";
				selection = "L svetlo";
				size = 1;
				brightness = 1.0;
			};
					
			class RightLight : LeftLight {
				position = "P svetlo";
				direction = "konec P svetla";
				hitpoint = "P svetlo";
				selection = "P svetlo";
			};
		};
		
		aggregateReflectors[] = {{"LeftLight","RightLight"}};
		
		class TransportMagazines {
			class _xx_UO_20Rnd_762x51_L1A1 {
				count = 15;
				magazine = "UO_20Rnd_762x51_L1A1";
			};
			class _xx_UO_20Rnd_762x51_T_L1A1 {
				count = 5;
				magazine = "UO_20Rnd_762x51_T_L1A1";
			};
			class _xx_SmokeShell {
				count = 4;
				magazine = "SmokeShell";
			};
			class _xx_ACE_Rope_TOW_M_5 {
				count = 1;
				magazine = "ACE_Rope_TOW_M_5";
			};
		};
				
		class AnimationSources {
			class ammo_belt_rotation
			{
				source="reload";
				weapon="UO_GPMG_veh";
			};

			class gunBarrel
			{
				source = "reload";
				weapon = "UO_GPMG_veh";
			};

			class ammobelt_hide
			{
				source="reloadMagazine";
				weapon="UO_GPMG_veh";
			};

			class hide_gun {
				source = "user";
				animperiod = 0.03;
			};
		};

		class Turrets {
			class MainTurret: NewTurret	{
				animationSourceBody = "MainTurret";
				animationSourceGun = "MainGun";
				outGunnerMayFire = 1;
				inGunnerMayFire = 0;
				canHideGunner = 0;
				viewGunnerInExternal = 1;
				gunnerHasFlares = 1; // required parameter for tanks
				gunnerAction = BLX_Gunner;
				gunnerInAction = BLX_Gunner;
				minElev=-10;
				maxElev=+20;
				initElev=0;
				InitTurn=0;
				LODTurnedOut = 1000;
				LODTurnedIn = 1000;
				soundservo[] = {"\ca\Weapons\Data\Sound\gun_elevate2", 0.001, 1};
				weapons[] = {"UO_GPMG_veh"};
				magazines[] ={"100Rnd_762x51_M240","100Rnd_762x51_M240","100Rnd_762x51_M240","100Rnd_762x51_M240","100Rnd_762x51_M240","100Rnd_762x51_M240","100Rnd_762x51_M240"};
				gunnerOpticsModel = ""; // for turned in position
				gunnerForceOptics = 0;
				gunneroutopticsmodel = "\ca\Weapons\optika_empty";
				gunnerOpticsEffect[] = {};
				gunnerOutOpticsEffect[] = {};
				gunnerOpticsShowCursor=0;
				gunnerOutOpticsShowCursor=0;
				castGunnerShadow = true;
				startEngine = 0;
				commanding = 1;
				hasGunner = 1;
				proxyType = "CPGunner";
				proxyindex = 1;
				primaryGunner = 1;
				primaryObserver = 0;
				memoryPointsGetInGunner = "pos gunner";
				memoryPointsGetInGunnerDir = "pos gunner dir";
				memoryPointGunnerOptics = "gunnerview";
				memoryPointGunnerOutOptics = "gunnerview";
				memoryPointGun = "kulas";
				selectionFireAnim = "zasleh";		
				
				class ViewOptics {
					initAngleX=0; minAngleX=-15; maxAngleX=+15;
					initAngleY=0; minAngleY=-90; maxAngleY=+90;
					initFov=0.42; minFov=0.22; maxFov=0.64;
				};
				class ViewGunner {
					initAngleX = 0; minAngleX = -25; maxAngleX = 45;
					initAngleY = 0; minAngleY = -90; maxAngleY = 90;
					 initFov = 0.7; minFov = 0.25; maxFov = 1.0;
				};
				
				class HitPoints {
					class HitTurret {
						armor = 0.5;
						material = -1;
						name = "vez";
						visual = "vez";
						passThrough = 0.1;
					};
						
					class HitGun {
						armor = 0.4;
						material = -1;
						name = "zbran";
						visual = "zbran";
						passThrough = 0.1;
					};
				};
			};

		};//turrets	
		
		class Damage {
			tex[]={};
			mat[]={
				"UO_UK85_APC\data\432_01.rvmat", // 0 damage
				"UO_UK85_APC\data\432_01_damage.rvmat", // 50% damage
				"UO_UK85_APC\data\432_01_destruct.rvmat", // 100% damage
				"UO_UK85_APC\data\432_02.rvmat",
				"UO_UK85_APC\data\432_02.rvmat",
				"UO_UK85_APC\data\432_02_destruct.rvmat",
				"UO_UK85_APC\data\432_03.rvmat",
				"UO_UK85_APC\data\432_03.rvmat",
				"UO_UK85_APC\data\432_03_destruct.rvmat",
				"UO_UK85_APC\data\interior.rvmat",
				"UO_UK85_APC\data\interior.rvmat",
				"UO_UK85_APC\data\interior_destruct.rvmat"
			};
		};	
		
		
		class ViewPilot: ViewPilot{
			minAngleY=-90; maxAngleY=90;
		};
		
		class HeadLimits: HeadLimits {
			minAngleY=-90; maxAngleY=90;
		};
	};
	
	class UO_FV432_D : UO_FV432_W 
	{
		model = \UO_UK85_APC\BLX_FV432_basicD;
		displayName = "FV432";
		faction = "BIS_BAF";
		vehicleclass = "ArmouredD";
		hiddenSelections[] = {"num1"};
		hiddenSelectionsTextures[] = {"\UO_UK85_APC\data\432_01d_co.paa"};
		class Damage {
			tex[]={};
			mat[]={
				"UO_UK85_APC\data\432_01d.rvmat", // 0 damage
				"UO_UK85_APC\data\432_01_damage.rvmat", // 50% damage
				"UO_UK85_APC\data\432_01_destruct.rvmat", // 100% damage
				"UO_UK85_APC\data\432_02.rvmat",
				"UO_UK85_APC\data\432_02.rvmat",
				"UO_UK85_APC\data\432_02_destruct.rvmat",
				"UO_UK85_APC\data\432_03d.rvmat",
				"UO_UK85_APC\data\432_03d.rvmat",
				"UO_UK85_APC\data\432_03d_destruct.rvmat",
				"UO_UK85_APC\data\interior.rvmat",
				"UO_UK85_APC\data\interior.rvmat",
				"UO_UK85_APC\data\interior_destruct.rvmat"
			};
		};
	};//desertversion	

	class UO_FV432_AMBW : UO_FV432_W {
		ace_w_heal = 1;
		ace_w_heal_leftdam_rest = 0.25;
		model = \UO_UK85_APC\BLX_FV432_medevac;
		crew = UO_UK85_CW;
		scope=public;
		displayName="FV432 (Ambulance)";
		class Turrets {};
		attendant = 1;
		hasGunner = 0;
		icon = "\Ca\tracked_e\Data\ui\Icon_m113_amb_CA.paa";
		accuracy=0.1;
		damageResistance = 5;
		vehicleclass = "Support";
		threat[] = {0.0, 0.0, 0.0};
		transportSoldier = 3;
		cargoAction[] = {"Stryker_Cargo01","Stryker_Cargo01","Stryker_Cargo01"};
		cargoIsCoDriver[] = {0};
       	hiddenSelections[] = {"num1"};
       	hiddenSelectionsTextures[] = {"\UO_UK85_APC\data\medevac_co.paa"};
		transportmaxbackpacks = 9999;
		transportmaxmagazines = 9999;
		transportmaxweapons = 9999;
		class TransportMagazines {
			class _xx_ACE_Rope_TOW_M_5 {
				count = 1;
				magazine = "ACE_Rope_TOW_M_5";
			};
			class _xx_SmokeShell {
				count = 2;
				magazine = "SmokeShell";
			};
			class _xx_SmokeShellGreen {
				count = 2;
				magazine = "SmokeShellGreen";
			};
			class _xx_ACE_Bandage {
				count = 100;
				magazine = "ACE_Bandage";
			};
			class _xx_ACE_LargeBandage {
				count = 50;
				magazine = "ACE_LargeBandage";
			};
			class _xx_ACE_Morphine {
				count = 100;
				magazine = "ACE_Morphine";
			};
			class _xx_ACE_Epinephrine {
				count = 100;
				magazine = "ACE_Epinephrine";
			};
			class _xx_ACE_Medkit {
				count = 20;
				magazine = "ACE_Medkit";
			};
			class _xx_ACE_Bodybag {
				count = 2;
				magazine = "ACE_Bodybag";
			};
		};
		class Damage {
			tex[]={};
			mat[]={
				"UO_UK85_APC\data\432_01.rvmat", // 0 damage
						"UO_UK85_APC\data\432_01_damage.rvmat", // 50% damage
						"UO_UK85_APC\data\432_01_destruct.rvmat", // 100% damage
				"UO_UK85_APC\data\432_02.rvmat",
						"UO_UK85_APC\data\432_02.rvmat",
						"UO_UK85_APC\data\432_02_destruct.rvmat",
				"UO_UK85_APC\data\432_03.rvmat",
						"UO_UK85_APC\data\432_03.rvmat",
						"UO_UK85_APC\data\432_03_destruct.rvmat",
				"UO_UK85_APC\data\basket.rvmat",
						"UO_UK85_APC\data\basket.rvmat",
						"UO_UK85_APC\data\basket_destruct.rvmat",
						"UO_UK85_APC\data\interior.rvmat",
						"UO_UK85_APC\data\interior.rvmat",
						"UO_UK85_APC\data\interior_destruct.rvmat"
					};
		};
	};//ambulance	
	class UO_FV432_AMBD : UO_FV432_AMBW {
		displayName="FV432 (Ambulance)";
		hiddenSelections[] = {"num1","num2","num3","num4"};
		hiddenSelectionsTextures[] = 			
			{"\UO_UK85_APC\data\medevacD_co.paa",
			"\UO_UK85_APC\data\432_02d_co.paa",
			"\UO_UK85_APC\data\432_03d_co.paa",
			"\UO_UK85_APC\data\basketD_co.paa"};
	};//ambulance desert
}; //CfgVehicles


class CfgMovesBasic {
	class DefaultDie;	// External class reference
	
	class ManActions {
		BLX_Driver = "BLX_Driver";
		BLX_Gunner = "BLX_Gunner";
                BLX_Gunner_1 = "BLX_Gunner_1";
	};
};

class CfgMovesMaleSdr : CfgMovesBasic {
	class States {
		class Crew;	// External class reference
		
		class BLX_Driver : Crew {
			file = "\ca\tracked\Data\Anim\M113_Driver.rtm";
			interpolateTo[] = {"KIA_M113_Driver", 1};
		};

		class BLX_Driver_Dead : DefaultDie {
			actions = "DeadActions";
			speed = 1;
			looped = false;
			terminal = true;
			file = "\ca\tracked\Data\Anim\KIA_M113_Driver";
			connectTo[] = {"DeadState", 0.1};
		};
		
		class BLX_Gunner : Crew {
                          file = "\UO_UK85_APC\Data\Anim\testanim.rtm";
			interpolateTo[] = {"KIA_M113_Gunner", 1};
		};

		class BLX_Gunner_Dead : DefaultDie {
			actions = "DeadActions";
			speed = 1.5;
			looped = false;
			terminal = true;
			file = "\ca\tracked\Data\Anim\KIA_M113_Gunner.rtm";
			connectTo[] = {"DeadState", 0.1};
		};
	};
};


class CfgWeapons {
	class ACE_M240_veh_out;
    class UO_GPMG_veh : ACE_M240_veh_out
	{
		displayName = "GPMG";
		handAnim[] = {"OFP2_ManSkeleton", "\BLX_FV432\data\Anim\testanim.rtm"};
		autoReload = 0;
	};
};//CfgWeapons


