Class_name = "CTurret"
object_name = "Turret_Ju523mg4e"

[COCKPIT_LIMITS]
x= -0.2, 0.2
y= -0.1, 0.05
z= -0.2, 0.2
[END]

[OPEN_COCKPIT_LIMITS]
x= -0.2, 0.2
y= -0.1, 0.05
z= -0.2, 0.2
[END]

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

CollisionBody="graphics/planes/Ju523mg4e/Ju523mg4e-C1.col"

VisualRadius=5.0

mp_site=true

[attach=0]
	position = 0.0,0.0,0.0
	object = "LuaScripts/WorldObjects/Bots/BotGunner_He111H6top_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.txt"

SoundScript="LuaScripts/Sound/Planes/Ju523mg4e_T.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, 0400, 0, 08511, 0.0, "smooth_wrap",  0.2, "" //  -  

[TurretsPos=0]
	position = 0.0, 0.0, 0.0
	PosMoveArg = 21000
	SeatArg=22111

	ReloadDelay = 0.3
	BotRotaionValueZ = 0.0	//-2.0
	LegsParameter = 0.0
	BotMinFirstAngle  = -90
	BotMaxFirstAngle  = 90
	BotMinSecondAngle = -90
	BotMaxSecondAngle = 0
	FirstToSecondInterp = 0.0
	BotAttachJointId = 0
	BotFirstAnimJointId = 2
	BotSecondAnimJointId  = 1

	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
	
	// Joints in orientation order!!!
	[Joint=0]
		SectorAngleMin = -180.0
		SectorAngleMax = 180.0
		DefaultPos = 0.5

		AngularSpeed   = 60.0

		AnimationArgMin = 0.0
		AnimationArgMax = 1.0

		AnimationArgNum = 21001

		Point = 0.0852, 0.1035, 0.0
		Axis = 0.0,1.0,0.0

		IsCycled = true

		SoundNumber = 1
	[end]

	[Joint=1]
		SectorAngleMin = -45.0
		SectorAngleMax = 0.0
		DefaultPos = 0.0
		
		AngularSpeed   = 30.0

		AnimationArgMin = 0.5
		AnimationArgMax = 1.0

		AnimationArgNum = 21002

		Point = 0.4483, -0.0093, 0

		Axis  = 0.0,0.0,1.0

		NextLinkedId = 2

		SoundNumber = 1

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

	[Joint=2]
		SectorAngleMin = -45.0
		SectorAngleMax = 45.0
		DefaultPos = 0.5
		
		AngularSpeed = 120.0
		
		AnimationArgMin = 0.25
		AnimationArgMax = 0.75

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

		DependFromPrevious = true
		PrevLinkedId = 1

		SoundNumber = 2
	[end]

	[GunAnimation=0]
		FireArg = 9013
	[end]

	FireLightArg=60220

	SightPosition = 0.0, 0.5, 0.0

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

	CamDisplacement = -0.51384, 0.148, 0.0
[end]


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

	Displacement = 0.5174, 0.0029, 0.0
	GunsightPosition = -0.51384, 0.148, 0.0
	ParallaxDistance = 400.0

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

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

	Deviation = 0.62917, 1.887, 0.0, 0.01, 0.04, 0.16  //1.25   , 12.5   ,    .  840/
	// /:
	//-      , /
	//-      , /
	//-       (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]

[Ammunition0]
	GunAmmunition0=0
[end]
[GunAmmunition0]
	MaxRoundsInMagazine = 150
	RoundsInMagazine = 150
	MaxReservedMagazines = 14
	ReservedMagazines = 14
	MaxMisFiresInMagazine = 0
	AmountRoundsWithOneTracer = 4
	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 = 1.0
StandDuration = 1.0
SitDuration = 1.0
PreEjectDuration = 1.0

//   ,         
SectorLimits = -180.0, -150.0, +47.0, +90.0
SectorLimits = -150.0, -140.0, +17.0, +90.0
SectorLimits = -140.0, -110.0,  -17.0, +90.0

SectorLimits =  -60.0,  -45.0,  -25.0, +90.0
SectorLimits =  -45.0,  -30.0,  -10.0, +90.0
SectorLimits =  -30.0,  +30.0,   -7.0, +90.0
SectorLimits =  +30.0,  +45.0,  -10.0, +90.0
SectorLimits =  +45.0,  +60.0,  -25.0, +90.0

SectorLimits = +110.0, +140.0, -17.0,  +90.0
SectorLimits = +140.0, +150.0, +17.0,  +90.0
SectorLimits = +150.0, +180.0, +47.0,  +90.0

[Entrance]
	EntrancePos= -2.709, -1.908, 0.5
	EntranceRot= 0,90,0
	JumpDir=0,1,5
[end]

// Damage

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

energyloss="",true,0.7,1000 //     , true -       -,       ,        
energyloss="gunc",true,5.0,20000 // 

[DGroup=MachineGun]
	IsCritical=false
	LifeK=20
	convex="gunc",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 