Class_name = "CTurret"
object_name = "Turret_he111h16_4"

[COCKPIT_LIMITS]
x= -0.22, 0.48
y= -0.22, 0.28
z= -0.5, 0.5
[END]

[OPEN_COCKPIT_LIMITS]
x= -0.22, 0.48
y= -0.22, 0.28
z= -0.5, 0.5
[END]

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

CollisionBody="graphics/planes/he111h16/he111h16-C4.col"

VisualRadius=5.0

mp_site=true

[attach=0]
	position = 0.507,0.0,0.0
	object = "LuaScripts/WorldObjects/Bots/BotGunner_He111H16side_GER41.txt"
[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_GER_7-92x57_APsmk.bin"

SoundScript="LuaScripts/Sound/Planes/he111h16_T4.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, 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, "" //    

CockpitArg = -2, 0000, 0, 9005, 0.0, "smooth_clamp", 0.3, "med_freq" // 
CockpitArg = -2, 0000, 1, 9105, 0.0, "smooth_clamp", 0.3, "med_freq" // 
CockpitArg = -2, 0001, 0, 9011, 0.0, "smooth_clamp", 1.0, "low_freq" //     
CockpitArg = -2, 0001, 1, 9111, 0.0, "smooth_clamp", 1.0, "low_freq" //     

AimAngleLimit=15,15

[TurretsPos=0]
	position = 0.50745, 0.5645, 0.76564
	PosMoveArg = 21000
	SeatArg=22211
	defaultturretpos = true

	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 = 89.999
		SectorAngleMax = 90.001
		DefaultPos = 0.5

		AngularSpeed   = 120.0

		AnimationArgMin = 0.5
		AnimationArgMax = 0.5

		AnimationArgNum = 20

		Point = 0,0,0
		Axis  = 0.0,1.0,0.0

		SoundNumber = 1
	[end]

	[Joint=1]
		SectorAngleMin = -15.0
		SectorAngleMax = 35.0
		DefaultPos = 0.3

		AngularSpeed   = 120.0

		AnimationArgMin = 0.416667
		AnimationArgMax = 0.694444

		AnimationArgNum = 22007

		Point = 0,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=2]
		SectorAngleMin = -40.0
		SectorAngleMax = 30.0
		DefaultPos = 0.5714286
		
		AngularSpeed = 120.0
		
		AnimationArgMin = 0.277778
		AnimationArgMax = 0.666667

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

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

	SightPosition = 0.0, 0.5, 0.0

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

	CamDisplacement = -0.30964,0.1344,0
[end]

[TurretsPos=1]
	position = 0.50745, 0.5645, -0.76564
	PosMoveArg = 21000
	SeatArg=22111

	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 = -90.001
		SectorAngleMax = -89.999
		DefaultPos = 0.5

		AngularSpeed   = 120.0

		AnimationArgMin = 0.5
		AnimationArgMax = 0.5

		AnimationArgNum = 21

		Point = 0,0,0
		Axis  = 0.0,1.0,0.0

		SoundNumber = 1
	[end]

	[Joint=1]
		SectorAngleMin = -15.0
		SectorAngleMax = 35.0
		DefaultPos = 0.3

		AngularSpeed   = 120.0

		AnimationArgMin = 0.416667
		AnimationArgMax = 0.694444

		AnimationArgNum = 21007

		Point = 0,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=2]
		SectorAngleMin = -30.0
		SectorAngleMax = 40.0
		DefaultPos = 0.4285714
		
		AngularSpeed = 120.0
		
		AnimationArgMin = 0.333333
		AnimationArgMax = 0.722222

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

	SightPosition = 0.0, 0.5, 0.0

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

	CamDisplacement = -0.30964,0.1344,0
[end]

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

	Displacement = 0.479,0.0,0
	GunsightPosition = -0.30964,0.1344,0
	ParallaxDistance = 400.0

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

	ReLoadingStagesTime = 1.0, 3.0, 1.0, 0.3

	ReservedMagazinesArgIdx = 0			// not used
	FlashAnimationArgIdx = 9113
	TriggerPositionArgIdx = 9101
	RoundsInMagazineArgIdx = 9111
	AmmunitionMovingArgIdx = 0			// not used
	HideAmmunitionArgIdx = 0			// not used
	ReLoadingArgIdx = 0					// not used
	AzimuthDeviationArgIdx = 9007
	ElevationDeviationArgIdx = 9006
	FiringPinPositionArgIdx = 0			// not used
	DrawAnimationArgIdx = 0, 9105

	Deviation = 0.6583, 2.975, 0.0, 0.01, 0.04, 0.16  //0.8333   , 3.3333   ,    .  790/
	// /:
	//-      , /
	//-      , /
	//-       (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 = 1
[end]

[TurretsGun=1]
	LinkedTurretPos = 1
//	Convex = "gun1"
	DGroup="MachineGun1"
	DamageProp = 0.25

	Displacement = 0.479,0.0,0
	GunsightPosition = -0.30964,0.1344,0
	ParallaxDistance = 400.0

	GunType = "LuaScripts/WorldObjects/Weapons/MG_GER_MG81.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 = 9107
	ElevationDeviationArgIdx = 9106
	FiringPinPositionArgIdx = 0			// not used
	DrawAnimationArgIdx = 0, 9005

	Deviation = 0.6583, 2.975, 0.0, 0.01, 0.04, 0.16  //0.8333   , 3.3333   ,    .  790/
	// /:
	//-      , /
	//-      , /
	//-       (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=0
[end]
[GunAmmunition0]
	MaxRoundsInMagazine = 500
	RoundsInMagazine = 500
	MaxReservedMagazines = 0
	ReservedMagazines = 0
	MaxMisFiresInMagazine = 0
	AmountRoundsWithOneTracer = 8
	ParallaxConfig="LuaScripts/WorldObjects/Ballistics/Projectiles/BULLET_GER_7-92x57_APsmk.bin"
	BulletConfig = "LuaScripts/WorldObjects/Ballistics/Projectiles/BULLET_GER_7-92x57_APsmk.txt"
[end]

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

//   ,         
//SectorLimits = -180.0, -125.0,  -15.0,  +90.0

[Entrance]
	EntrancePos= 0.10947, -1.1, 0
	EntranceRot= 0,0,0
	JumpDir=0,-5,0
[end]

// Damage

SphereHitProtection=0	//  /     

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

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

Armor=0
LifeRate=500
LifeRateFrag=700 
Firing=0.0 

energyloss="",true,0.7,1000 //     , true -       -,       ,        
energyloss="gun0",true,5.0,20000 // 
energyloss="gun1",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"
	[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

AttackDistance   = 1000.0		//AI max aim distance versus ground point
AttackDistanceTrgGnd = 1000.0	//AI max aim distance versus ground target
AttackDistanceTrgAir = 1000.0		//AI max aim distance versus air target

AIStartAimErrModifier = 0.1		//Modifier for AI initial bracketing aim error (reduced twice with each shot)

AIAimDelayModifier = 0.1		//Modifier for AI delay before start to aim to a new target at 1000m range

ReArmTime=15 //  60,     -2  2 