Class_name = "CTurret"
object_name = "Turret_Pe2s35_2"

[COCKPIT_LIMITS]
x= -1.1, 0.4
y= -0.2, 0.18
z= -0.25, 0.25
[END]

[OPEN_COCKPIT_LIMITS]
x= -1.1, 0.4
y= -0.2, 0.18
z= -0.25, 0.25
[END]

VisualImage=0,"graphics/planes/Pe2s35/Pe2s35-C2-low.mgm",true
VisualImage=1,"graphics/planes/Pe2s35/Pe2s35-C2.mgm",false

CollisionBody="graphics/planes/Pe2s35/Pe2s35-C2.col"

VisualRadius=5.0

mp_site=true

[attach=0]
	position = 0.2,-0.42,0
	object = "LuaScripts/WorldObjects/Bots/BotGunner_Pe2s35rear_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/Pe2s35_T2.cfg"

DropsArg=100
HumidityArg=101

SetCockpitArgs=false	// 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, 0430, 0, 02509, 0.0, "smooth_clamp", 0.0, "" //  
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, 0850, 2, 07002, 0.0, "smooth_clamp", 0.2, "" //    

AimAngleLimit=15

[TurretsPos=0]
	position = 0.868, -0.621, 0.0
	PosMoveArg = 21000
	SeatArg=22111
	SeatUpTime=1.0
	SeatDownTime=1.0
	defaultturretpos = true

	HMDSingleEye = true

	ReloadDelay = 0.3
	BotRotaionValueZ = 0.0	//-2.0
	LegsParameter = 0.0
	BotMinFirstAngle  = -90
	BotMaxFirstAngle  = 90
	BotMinSecondAngle = -90
	BotMaxSecondAngle = 90
	FirstToSecondInterp = 0.0
	
	LockTurretCamera=true
	
	// Joints in orientation order!!!

	[Joint=0]
		SectorAngleMin = -2.0
		SectorAngleMax = 50.0
		DefaultPos = 0.03846154

		AngularSpeed   = 120.0

		AnimationArgMin = 0.488889
		AnimationArgMax = 0.777778

		AnimationArgNum = 21002

		Point = -0.008,-0.066,0.0
		Axis  = 0.0,0.0,1.0

		SoundNumber = 1

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

	[Joint=1]
		SectorAngleMin = -30.0
		SectorAngleMax = 30.0
		DefaultPos = 0.5
		
		AngularSpeed = 120.0
		
		AnimationArgMin = 0.333333
		AnimationArgMax = 0.666667

		AnimationArgNum = 21006
		
		Point = 0,0,0
		Axis  = 0.0,1.0,0.0

		SoundNumber = 2
	[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 = 0
	BotSecondAnimJointId  = 1

	SightPosition = 0.0, 0.5, 0.0

	defaultDirection = 1.0, 0.0, 0.0
	AimSector=-30, 30, -50, 5	//AI aim limits: left, right, down, up

	CamDisplacement = 0.0233, 0.1212, 0.1057
[end]


[TurretsPos=1]
	position = -0.2118, 0.1139, 0.6165
	PosMoveArg = 21000

	ReloadDelay = 0.3
	BotRotaionValueZ = 0.0	//-2.0
	LegsParameter = 0.0
	BotMinFirstAngle  = -90
	BotMaxFirstAngle  = 90
	BotMinSecondAngle = 0
	BotMaxSecondAngle = 180
	FirstToSecondInterp = 0.0
	
	LockTurretCamera=false
	
	// Joints in orientation order!!!

	[Joint=0]
		SectorAngleMin = 54.0
		SectorAngleMax = 115.0
		DefaultPos = 0.5901639

		AngularSpeed   = 120.0

		AnimationArgMin = 0.3
		AnimationArgMax = 0.638889

		AnimationArgNum = 22006

		Point = -0.0,0.0,0.0
		Axis  = 0.0,1.0,0.0

		SoundNumber = 1
	[end]

	[Joint=1]
		SectorAngleMin = -22.0
		SectorAngleMax = 23.0
		DefaultPos = 0.488888889
		
		AngularSpeed = 120.0
		
		AnimationArgMin = 0.377778
		AnimationArgMax = 0.627778

		AnimationArgNum = 22007
		
		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 = 9113
	[end]

	FireLightArg=60230

	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 = 1
	BotSecondAnimJointId  = 0

	SightPosition = 0.0, 0.5, 0.0

	defaultDirection = 0.0, 0.0, 1.0
	AimSector=50, 115, -25, 25	//AI aim limits: left, right, down, up

	CamDisplacement = -0.4838, 0.1234, 0.0
[end]

[TurretsPos=2]
	position = -0.2118, 0.1139, -0.6165
	PosMoveArg = 21000

	ReloadDelay = 0.3
	BotRotaionValueZ = 0.0	//-2.0
	LegsParameter = 0.0
	BotMinFirstAngle  = -90
	BotMaxFirstAngle  = 90
	BotMinSecondAngle = -180
	BotMaxSecondAngle = 0
	FirstToSecondInterp = 0.0
	
	LockTurretCamera=false
	
	// Joints in orientation order!!!

	[Joint=0]
		SectorAngleMin = -112.0
		SectorAngleMax = -52.0
		DefaultPos = 0.36666667

		AngularSpeed   = 120.0

		AnimationArgMin = 0.377778
		AnimationArgMax = 0.711111

		AnimationArgNum = 22006

		Point = -0.0,0.0,0.0
		Axis  = 0.0,1.0,0.0

		SoundNumber = 1
	[end]

	[Joint=1]
		SectorAngleMin = -22.0
		SectorAngleMax = 23.0
		DefaultPos = 0.488888889
		
		AngularSpeed = 120.0
		
		AnimationArgMin = 0.377778
		AnimationArgMax = 0.627778

		AnimationArgNum = 22007
		
		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 = 9113
	[end]

	FireLightArg=60240

	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 = 1
	BotSecondAnimJointId  = 0

	SightPosition = 0.0, 0.5, 0.0

	defaultDirection = 0.0, 0.0, -1.0
	AimSector=-115, -50, -25, 25	//AI aim limits: left, right, down, up

	CamDisplacement = -0.4838, 0.1234, 0.0
[end]


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

	Displacement = 0.978, 0.071, 0.0
	GunsightPosition = 0.0233, 0.1212, 0.1057
	ParallaxDistance = 400.0

	GunType = "LuaScripts/WorldObjects/Weapons/MG_RUS_UB.txt"

	ReLoadingStagesTime = 1.0, 3.0, 1.0, 0.3

	ReservedMagazinesArgIdx = 0			// not used
	FlashAnimationArgIdx = 9013
	TriggerPositionArgIdx = 9001
	RoundsInMagazineArgIdx = 9011
	AmmunitionMovingArgIdx = 0			// not used
	HideAmmunitionArgIdx = 0			// not used
	ReLoadingArgIdx = 0					// not used
	AzimuthDeviationArgIdx = 9006
	ElevationDeviationArgIdx = 9007
	FiringPinPositionArgIdx = 0			// not used
	DrawAnimationArgIdx = 0, 9005

	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.177, 0.013, -0.004
	BushSpeed = 1.0, -1.0, 0.0

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

	SoundNumber = 1
[end]


[TurretsGun=1]
	LinkedTurretPos = 1,2
//	Convex = "gun1"
	DGroup="MachineGun2"
	DamageProp = 0.25

	Displacement = 0.4326, -0.0097, 0.0
	GunsightPosition = -0.4838, 0.1234, 0.0
	ParallaxDistance = 400.0

	GunType = "LuaScripts/WorldObjects/Weapons/MG_RUS_ShKAS.txt"

	ReLoadingStagesTime = 1.0, 3.0, 1.0, 0.3

	ReservedMagazinesArgIdx = 9119
	FlashAnimationArgIdx = 9113
	TriggerPositionArgIdx = 9101
	RoundsInMagazineArgIdx = 9111
	AmmunitionMovingArgIdx = 9009
	HideAmmunitionArgIdx = 9112
	ReLoadingArgIdx = 9118
	AzimuthDeviationArgIdx = 9106
	ElevationDeviationArgIdx = 9107
	FiringPinPositionArgIdx = 0			// not used
	DrawAnimationArgIdx = 0, 9105

	Deviation = 0.8856, 2.6568, 0.0, 0.008, 0.1, 0.4  //1.08    (  -2), 4.32   ,    .  820/
	// /:
	//-      , /
	//-      , /
	//-       (0.9 -    0.1  ,   )
	//-    
	//-     
	//-      100/

	NumOfAnimations = 4

//	BushCoord = -0.114461, 0.0436303, -0.0287316
//	BushSpeed = 0.944, -0.096, -0.316

//	BushConfig = "LuaScripts/WorldObjects/Trash/Batch_case07-08mm.txt"

	SoundNumber = 2
[end]

[Ammunition0]
	GunAmmunition0=0
	GunAmmunition1=1
[end]
[GunAmmunition0]
	MaxRoundsInMagazine = 500
	RoundsInMagazine = 500
	MaxReservedMagazines = 0
	ReservedMagazines = 0
	MaxMisFiresInMagazine = 0
	AmountRoundsWithOneTracer = 4
	ParallaxConfig="LuaScripts/WorldObjects/Ballistics/Projectiles/BULLET_RUS_12-7x108_AP.bin"
	BulletConfig = "LuaScripts/WorldObjects/Ballistics/Projectiles/BULLET_RUS_12-7x108_AP.txt"
	BulletConfig = "LuaScripts/WorldObjects/Ballistics/Projectiles/BULLET_RUS_12-7x108_HE.txt"
	BulletConfig = "LuaScripts/WorldObjects/Ballistics/Projectiles/BULLET_RUS_12-7x108_AP.txt"
[end]
[GunAmmunition1]
	MaxRoundsInMagazine = 100
	RoundsInMagazine = 100
	MaxReservedMagazines = 6
	ReservedMagazines = 6
	MaxMisFiresInMagazine = 0
	AmountRoundsWithOneTracer = 8
	ParallaxConfig="LuaScripts/WorldObjects/Ballistics/Projectiles/BULLET_RUS_7-62x54_APsmk.bin"
	BulletConfig = "LuaScripts/WorldObjects/Ballistics/Projectiles/BULLET_RUS_7-62x54_APsmk.txt"
[end]

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

//   ,         
//SectorLimits = -180.0, -50.0,  -2.5,  +90.0

[Entrance]
	EntrancePos= 0.2,-0.42,0
	EntranceRot= 0,0,0
	JumpDir=0,-8,0
[end]

// Damage

SphereHitProtection=0	//  /     

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

[SphereProtectionBoxClose]	//    ,        ,   ,     SphereHitProtection=
	FovH=90					//          ,     ,  ArmorFront
	FovV=90					//          ,     ,  ArmorFront
							//  5        
	ArmorFront=2
	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="gun0",true,5.0,20000 // 
energyloss="gun1",true,5.0,20000 // 
energyloss="gun2",true,5.0,20000 // 

[DGroup=MachineGun1]
	IsCritical=false
	LifeK=20
	convex="gun0",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]
[DGroup=MachineGun2]
	IsCritical=false
	LifeK=20
	convex="gun1",5,600,"MT_ARMOR"
	convex="gun2",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=22101
canopyLockSoundMask=9 	// 0 bit - canopy unlock, start
						// 1 bit - canopy unlock, end
						// 2 bit - canopy lock, start
						// 3 bit - canopy lock, end
NoAimingWhenOpened=false

ReArmTime=15 //  60,     -2  2 