Class_name = "CTurret"
object_name = "Turret_A20B_1"

[COCKPIT_LIMITS]
x= -0.15, 0.27
y= -0.05, 0.22
z= -0.25, 0.25
[END]

[OPEN_COCKPIT_LIMITS]
x= -0.15, 0.27
y= -0.05, 0.22
z= -0.25, 0.25
[END]

VisualImage=0,"graphics/planes/A20B/A20B-C3-low.mgm",true
VisualImage=1,"graphics/planes/A20B/A20B-C3.mgm",false
KeepNetworkImages=true

CollisionBody="graphics/planes/A20B/A20B-C3.col"

VisualRadius=2.0

mp_site=true

[attach=0]
	position = -0.52,-0.46,0
	object = "LuaScripts/WorldObjects/Bots/BotGunner_A20Btop_RUSwi.txt"
	rotation= 0, 0, 0
[end]

[attach=1]
	position = 0.0, 0.0, 0.0
	object = "LuaScripts/WorldObjects/TurretRiffle.txt"
[end]

[attach=2]
	position = 0.0, 0.0, 0.0
	object = "LuaScripts/WorldObjects/TurretCamera.txt"
[end]

TargetingScript = "LuaScripts/WorldObjects/Ballistics/Projectiles/BULLET_RUS_7-62x54_APsmk.bin"

SoundScript="LuaScripts/Sound/Planes/A20B_T1.cfg"

DropsArg=100
HumidityArg=101

SetCockpitArgs=true	// true -             , false -              

//CockpitArg= FetchType, CmdID, SubcmdID, ArgNum, ArgValDefault, SmoothingType, SmoothingPower, NetworkFlag
//FetchType=-1:       
//FetchType=-2:         
//FetchType=-3:          parent-
//FetchType>=0:          child-   Attach ID
//CmdID=[0..999]: ID    ,    .
//CmdID=[1000..1999]: ID    ,    .
//SubcmdID=[0..3]: ID     .
//SubcmdID=[0..1]: ID     .
//ArgNum:     / .
//ArgValDefault:      ,    .
//SmoothingType: smooth_clamp -  - 
//SmoothingType: smooth_wrap -   
//SmoothingPower:   
//NetworkFlag="":           ,  SetCockpitArgs=false
//NetworkFlag="low_freq":     ,       ,    
//NetworkFlag="med_freq":     ,       ,    
//NetworkFlag="high_freq":     ,       ,    
//NetworkFlag="granted_single":     ,       ,     

CockpitArg = -3, 0000, 0, 00402, 0.5, "smooth_clamp", 0.2, "" //  -   
CockpitArg = -3, 1000, 0, 00406, 0.5, "smooth_clamp", 0.1, "" //  /  () -   
CockpitArg = -3, 1000, 1, 00407, 0.5, "smooth_clamp", 0.1, "" //  /  () -   

CockpitArg = -3, 0100, 0, 01100, 0.0, "smooth_clamp", 0.2, "" //  ( )  
CockpitArg = -3, 0100, 1, 01111, 0.0, "smooth_clamp", 0.2, "" //      ( )  
CockpitArg = -3, 0110, 0, 01200, 0.0, "smooth_clamp", 0.2, "" //  ( )  
CockpitArg = -3, 0110, 1, 01211, 0.0, "smooth_clamp", 0.2, "" //      ( )  

CockpitArg = -3, 0431, 1, 04323, 0.0, "smooth_clamp", 0.1, "" //   ( )   
CockpitArg = -3, 0430, 1, 60210, 0.0, "smooth_clamp", 0.0, "" //   

CockpitArg = -3, 0434, 1, 06010, 0.0, "smooth_clamp", 0.2, "" //   
CockpitArg = -3, 0434, 2, 06011, 0.0, "smooth_clamp", 0.2, "" //    ("  ")
CockpitArg = -3, 0434, 3, 06012, 0.0, "smooth_clamp", 0.2, "" //   

CockpitArg = -3, 0452, 0, 04314, 0.0, "smooth_clamp", 0.2, "" // 

CockpitArg = -3, 0466, 0, 04305, 0.0, "smooth_clamp", 0.2, "" //  
CockpitArg = -3, 0466, 1, 04306, 0.0, "smooth_clamp", 0.2, "" //  
CockpitArg = -3, 0466, 2, 04307, 0.0, "smooth_clamp", 0.2, "" //  
CockpitArg = -3, 0466, 3, 04308, 0.0, "smooth_clamp", 0.2, "" //  

CockpitArg = -2, 0000, 0, 9019, 0.0, "smooth_clamp", 0.0, "granted_single" //     
CockpitArg = -2, 0001, 0, 9018, 0.0, "smooth_clamp", 0.5, "med_freq" //     

[TurretsPos=0]
	position = 0.0, 0.0, 0.0

	PosMoveArg = 21000
	SeatArg=22101
	SeatUpTime=5.0
	SeatDownTime=5.0

	ReloadDelay = 0.3
	BotRotaionValueZ = 0.0
	LegsParameter = 0.0
	BotMinFirstAngle  = -90
	BotMaxFirstAngle  = 90
	BotMinSecondAngle = -90
	BotMaxSecondAngle = 90
	FirstToSecondInterp = 0.0
	
	LockTurretCamera=false
	
	// Joints in orientation order!!!
	[Joint=0]
		SectorAngleMin = -72.0
		SectorAngleMax = 72.0
		DefaultPos = 0.5

		AngularSpeed   = 60.0

		AnimationArgMin = 0.1
		AnimationArgMax = 0.9

		AnimationArgNum = 21001

		Point = 0.3665,0.1403,0.0
		Axis = 0.0,1.0,0.0

		IsCycled = false
		NextLinkedId = 1

		SoundNumber = 1
	[end]

	[Joint=1]
		SectorAngleMin = -18.0
		SectorAngleMax = 18.0
		DefaultPos = 0.5

		AngularSpeed   = 120.0

		AnimationArgMin = 0.4
		AnimationArgMax = 0.6

		AnimationArgNum = 21006

		Point = -0.0803,0.2134,0
		Axis  = 0.0,1.0,0.0

		DependFromPrevious = true
		PrevLinkedId = 0

		SoundNumber = 2
	[end]

	[Joint=2]
		SectorAngleMin = -60.0
		SectorAngleMax = 20.0
		DefaultPos = 0.75
		
		AngularSpeed = 120.0
		
		AnimationArgMin = 0.166667
		AnimationArgMax = 0.611111

		AnimationArgNum = 21007
		PrevLinkedId = 1
		
		Point = 0,0,0
		Axis  = 0.0, 0.0, 1.0

		SoundNumber = 2

		NoMoveFar=true	// Block rotation when the target is in the rear henisphere
	[end]

	[GunAnimation=0]
		FireArg = 9013
	[end]

	FireLightArg=60220

	relativeBotStand = 0.0, 0.0, 0.0
	relativeBotSit = 0.0, 0.0, 0.0
	relativeBotDead = 0.0, 0.0, 0.0
	TransitionStandPower = 1
	TransitionDeadPower = 1

	BotAttachJointId = 0
	BotFirstAnimJointId = 2
	BotSecondAnimJointId  = 1

	SightPosition = 0.0, 0.5, 0.0

	defaultDirection = 1.0, 0.0, 0.0
	AimSector=-100, 100, -20, 35	//AI aim limits: left, right, down, up

	CamDisplacement = -0.55,0.1494,0

[end]


[TurretsGun=0]
	LinkedTurretPos = 0
//	Convex = "gun0"
	DGroup="MachineGun"
	DamageProp = 0.25

	Displacement = 0.8634,0.018,0
	GunsightPosition = -0.534,0.1493,0
	ParallaxDistance = 400.0

	GunType = "LuaScripts/WorldObjects/Weapons/MG_USA_M2-50.txt"

	ReLoadingStagesTime = 1.0, 3.0, 1.0, 0.3
 
	ReservedMagazinesArgIdx = 9019
	FlashAnimationArgIdx = 9013
	TriggerPositionArgIdx = 9001
	RoundsInMagazineArgIdx = 0			// not used
	AmmunitionMovingArgIdx = 9009
	HideAmmunitionArgIdx = 9012
	ReLoadingArgIdx = 9018
	AzimuthDeviationArgIdx = 9006
	ElevationDeviationArgIdx = 9007
	FiringPinPositionArgIdx = 0			// not used
	DrawAnimationArgIdx = 0, 9005		//  
	DrawAnimationArgIdx = 2, 9003		// 

	Deviation = 1.16186, 3.486, 0.0, 0.015, 0.1, 0.4  //1.351    (  -2), 5.404   ,    .  860/
	// /:
	//-      , /
	//-      , /
	//-       (0.9 -    0.1  ,   )
	//-    
	//-     
	//-      100/

	NumOfAnimations = 4

	BushCoord = 0.0658,0.0533,0.046

	BushSpeed = 0.5, 0.0, 1.0

	BushConfig = "LuaScripts/WorldObjects/Trash/Batch_case12-20mm.txt"

	SoundNumber = 1
[end]

[Ammunition0]
	GunAmmunition0=0
[end]
[GunAmmunition0]
	MaxRoundsInMagazine = 100
	RoundsInMagazine = 100
	MaxReservedMagazines = 12
	ReservedMagazines = 12
	MaxMisFiresInMagazine = 0
	AmountRoundsWithOneTracer = 4
	ParallaxConfig="LuaScripts/WorldObjects/Ballistics/Projectiles/BULLET_USA_12-7x99_AP.bin"
	BulletConfig = "LuaScripts/WorldObjects/Ballistics/Projectiles/BULLET_USA_12-7x99_AP.txt"
[end]

SightPos = 0.0, 0.2, 0.0
PositionChangeTime = 1.0
StandDuration = 1.0
SitDuration = 1.0
PreEjectDuration = 1.0

//   ,         
SectorLimits = -45.0, -25.0, -10.0,  +90.0
SectorLimits = -25.0, -17.0, -6.0,  +90.0
SectorLimits = -17.0, +17.0, -2.0,   +90.0
SectorLimits = +17.0, +25.0, -6.0,  +90.0
SectorLimits = +25.0, +45.0, -10.0,  +90.0

[Entrance]
	EntrancePos= 1.477,-1.2135,0
	EntranceRot= 0,0,0
	JumpDir=0,-5,0
[end]

// Damage

SphereHitProtection=0	//  /     

[SphereProtectionBoxOpen]	//    ,        ,   ,     SphereHitProtection=
	FovH=30					//          ,     ,  ArmorFront
	FovV=30					//          ,     ,  ArmorFront
							//  5        
	ArmorFront=8
	ArmorBack=2
	ArmorTop=2
	ArmorBottom=2
	ArmorRight=2
	ArmorLeft=2
[end]

[SphereProtectionBoxClose]	//    ,        ,   ,     SphereHitProtection=
	FovH=30					//          ,     ,  ArmorFront
	FovV=30					//          ,     ,  ArmorFront
							//  5        
	ArmorFront=8
	ArmorBack=2
	ArmorTop=2
	ArmorBottom=2
	ArmorRight=2
	ArmorLeft=2
[end]

Armor=0
LifeRate=50000
LifeRateFrag=5000 
Firing=0.0 

energyloss="",true,0.7,1000 //     , true -       -,       ,        
energyloss="~gun03",true,5.0,20000 // 
energyloss="armor01",false,8.0,1 // - 8
energyloss="armor02",false,8.0,1 // - 8
energyloss="armor03",false,8.0,1 // - 8

[DGroup=MachineGun]
	IsCritical=false
	LifeK=20
	convex="~gun03",5,600,"MT_ARMOR"
	[SphereHitArmorBox]
		FovH=90
		FovV=90
		ArmorFront=5
		ArmorBack=15
		ArmorTop=5
		ArmorBottom=7
		ArmorRight=5
		ArmorLeft=5
	[end]
	LifeRateFrag=600
	RepairSpeed=0.0166667	// (1 )
	RepairSource=4
	InstantRepair=true
[end]

OpenCockpitArg=5
//canopyLockSoundMask=9 	// 0 bit - canopy unlock, start
						// 1 bit - canopy unlock, end
						// 2 bit - canopy lock, start
						// 3 bit - canopy lock, end
NoAimingWhenOpened=false

//CanopyRemoveTimeDelay=3		//    ,    (  )          

ReArmTime=15 //  60,     -2  2 
