Class_name = "CTurret"
object_name = "_SdKfz184_T2"

AimingRay=true

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

[OPEN_COCKPIT_LIMITS]
x= -0.5, 0.5
y= -0.2, 0.2
z= -0.5, 0.5
[END]

VisualImage=0,"graphics\Vehicles\_SdKfz184\_SdKfz184-C2-low.mgm",true
VisualImage=1,"graphics\Vehicles\_SdKfz184\_SdKfz184-C2.mgm",8
CollisionBody="graphics\Vehicles\_SdKfz184\_SdKfz184-C2.col"
HitBody="graphics\Vehicles\_SdKfz184\_SdKfz184-C2_DetColl.col"
KeepNetworkImages=true	//high-poly cockpit will be visible from other workstations of the object

//VisualImage=ID,model_or_effect,cast_shadows[,debris_effects]
//ID:					INT:	0 - visible everywhere, 1 - visible inside, 2 - visible outside
//model_or_effect:		STRING:	path to model file (mgm) of effect file (epl)
//cast_shadows: 		BOOL/INT:	cast shadows from object or not (cast_shadows=Attr1+Attr2+...+AttrN)
//						VIF_CASTSHADOWS=1,
//						VIF_BLENDMASKLAST=2,
//						VIF_ALWAYSONTOP=4,
//						VIF_FLATAMBIENT=8,
//[,debris_effects]:	BOOL:	optional parameter, show effects on object debris or not

ImageAttrs="IA_NOCLIP"
EnabledDecals=true	//      ,    
MaxDecals=8

TransparentCockpit=false	// If false - Attached bot will be not rendered if cockpit hatch is closed (default =true)

//LocalPosRot=true
ConvexAnimThreshold=0.000001	//  

VisualRadius=5.0

mp_site=true

[attach=0]
	object = "LuaScripts/WorldObjects/Bots/BotTankSdKfz184_Commander.txt"
	position = 0,0,0
	convex="bot_pos",false	//false: Attach object relative to "bot_pos" convex (not absolute)
[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
	rotation = 0,0,0
	object = "LuaScripts/WorldObjects/Vehicles/Sights/VisorCameraByAttach.txt"
	convex="visor0",false	//false: Attach object relative to convex (not absolute)
[end]

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

SoundScript="LuaScripts/Sound/Vehicles/SdKfz184_FP_Turret_T2.cfg"

Script="LuaScripts\ObjectScripts\Vehicles\_SdKfz184_T1.sc"

//FetchArgVal= cockpit_arg_num, transfer_number, default_cockpit_arg_val, interpolation_type (clamp - shortest on line scale, wrap - shortest on cyclic scale)

[TurretsPos=0]
	position = 0,0,0
	PosMoveArg = 21000

	HMDSingleEye = true
	LockTurretCamera=true

	// Joints in orientation order!!!

	[Joint=0]
		SectorAngleMin = -0.0001
		SectorAngleMax = 0.0001

		AngularSpeed   = 0.1
		PrecisionAngle = 1

		AnimationArgMin = 0.499999
		AnimationArgMax = 0.500001

		Point = 0,0,0
		Axis = 0.0,1.0,0.0
	[end]

	relativeBotStand = 0.0, 0.0, 0.0 // not used for tank
	relativeBotSit = 0.0, 0.0, 0.0 // not used for tank
	relativeBotDead = 0.0, 0.0, 0.0 // not used for tank
	TransitionStandPower = 1 // not used for tank
	TransitionDeadPower = 1 // not used for tank
	BotAttachJointId = 0
	BotFirstAnimJointId = 2
	BotSecondAnimJointId  = 1

	SightPosition = 0.0, 1, 0.0

	defaultDirection = 1, 0, 0

	CamDisplacement = 0,0,0
[end]

SightPos = 0.0, 1.3, 0.0
PositionChangeTime = 0.5
StandDuration = 1.0
SitDuration = 1.0
PreEjectDuration = 1.0
FreezeOnReload = false
AutoRecharge = false

GunSightDistanceArg = 9544
GunSightYawArg = 9546
GunSightTypeArg = 9545

//   ,         
//SectorLimits =  -45.0,  +45.0,  25.0, 90.0
//SectorLimits =	-180.0, -140.0, -15.0, 90.0
//SectorLimits =	 140.0,  180.0, -15.0, 90.0

// Damage

//BeamHitZeroArmor=true //      m_fArmor  m_fArmorSides ( ,       )
//LifeRate=5000
//LifeRateFrag=5000 
//Firing=0.005
//Armor=60
//[ArmorBox]			//    ,     ,   ,     Armor=
//	FovH=90			//          ,     ,  ArmorFront
//	FovV=90			//          ,     ,  ArmorFront
//					//  5        
//	ArmorFront=75
//	ArmorBack=60
//	ArmorTop=30
//	ArmorBottom=30
//	ArmorRight=60
//	ArmorLeft=60
//[end]

//maxDamageArgValue=0.98
//DamageArg=5000
damageablePart=""

IsCritical=false	//true -       
LifeK=100			//         ( -  )

KillChildObjectsOnParentDeath = true

SphereHitProtection=60	//       

[SphereProtectionBoxOpen]	//    ,        ,   ,     SphereHitProtection=
	FovH=90					//          ,     ,  ArmorFront
	FovV=20				//          ,     ,  ArmorFront
							//  5        
	ArmorFront=0
	ArmorBack=0
	ArmorTop=0
	ArmorBottom=25
	ArmorRight=0
	ArmorLeft=0
[end]

[SphereProtectionBoxClose]	//    ,        ,   ,     SphereHitProtection=
	FovH=90					//          ,     ,  ArmorFront
	FovV=150				//          ,     ,  ArmorFront
							//  5        
	ArmorFront=200
	ArmorBack=80
	ArmorTop=30
	ArmorBottom=25
	ArmorRight=30
	ArmorLeft=80
[end]

////	Energy loss for bullet travel through HitBody convices	////

energyloss="",true,1,200				//     , true -       -,       ,        
energyloss="#sight5_1055",false,1,1		// Commander rear visor
energyloss="^top_hatch_2a",false,20,1	// Commander's hatch, 20mm, K=1.0
energyloss="^top_hatch_2b",false,20,1	// Commander's hatch, 20mm, K=1.0

[ReflectArmorBox]	//    ,    energyloss=0,1.    ,     ,   ,     Armor=
	FovH=90			//          ,     ,  ArmorFront
	FovV=90		//          ,     ,  ArmorFront
					//  5        
	ArmorFront=20
	ArmorBack=20
	ArmorTop=20
	ArmorBottom=20
	ArmorRight=20
	ArmorLeft=20
[end]

//Graphical Damage Groups:

[DGroup=Visor]
	IsCritical=false
	LifeK=100
	convex="#sight5_1055",1,500,"MT_ARMOR"
	[SphereHitArmorBox]
		FovH=90
		FovV=20
		ArmorFront=1
		ArmorBack=1
		ArmorTop=1
		ArmorBottom=25
		ArmorRight=1
		ArmorLeft=1
	[end]
	LifeRateFrag=5000
	DamageArg=1055
	RepairSpeed=0.066667	// (15 )
	RepairSource=0
	InstantRepair=true
	GuiParam=16, true,true,true
[end]
[DGroup=Body]
	IsCritical=true
	LifeK=20
	DamageArg=5000
	MinValidLife=0.02
[end]

//End of Functional Damage Groups

[Entrance]
	EntrancePos= 1.0, 1.0, 2.2
	EntranceRot= 0,90,0
	JumpDir= 0,0,0
	GroundAligned= true
[end]

ColimatorHideArg=9547

//DefaultGun=0	//default=-1, all of the guns are active, switching belts in gun 0. >=0 sets default gun and switshing will be between guns

FixedHatch=false				// True -     
FixedWindow=false				// True -     
NoAimingWhenOpened=true			// True -      
DenyDisabledTurretCamera=true	// True -         
NoVisorCameraWhenOpened=true		// True -   -   
CanopyOpenByDefault=false
WindowOpenByDefault=false
canopytime=3.5625	//   Arg=0  Arg=0.95.     Arg=0.1  Arg=0.9     (3 ),    0.95/0.8*5=3.5625.
windowtime=2

OpenCockpitArg=31
AutoCanopy=false
CockpitLightArg=30000,0.25,0.251,0.6
canopyLockSoundMask=2 	// 0 bit - canopy unlock, start
						// 1 bit - canopy unlock, end
						// 2 bit - canopy lock, start
						// 3 bit - canopy lock, end

OpenWindowArg=33
AutoWindow=false
WindowLightArg=30010,0.3,0.4,0.6

//FlareHatchArg=32
//FlareHatchTime=1.0

TechChatCrewRole=5	//    (Driver: 1, Gunner: 3, Commander: 5, Machinegunner: 7, Radioman: 9)

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":     ,       ,     

VisorYawMin=-110
VisorYawArgMin=0.194444
VisorYawMax=+20
VisorYawArgMax=0.555556
VisorYawArg=40
VisorYawDefault=0
VisorYawSpeed=0.25
VisorPitchMin=-18
VisorPitchArgMin=0.4
VisorPitchMax=+18
VisorPitchArgMax=0.6
VisorPitchDefault=3.0
VisorPitchArg=35
VisorPitchSpeed=0.25
VisorResetWhileAim=false
VisorResetIfOpened=false
PrecisionAngle=2	//Rotation stop smoothing

CockpitArg = -3, 0000, 0, 60210, 0.0, "smooth_clamp", 0.0, ""			// Electric point lights
CockpitArg = -3, 0000, 1, 60310, 0.0, "smooth_clamp", 0.0, ""			// Electric flood light

CockpitArg = -2, 0100, 0, 9008, 0.0, "", 0.0, "granted_single"			//   

CockpitArg = -2, 0150, 0, 9001, 0.0, "smooth_clamp", 0.1, "med_freq"	// TriggerPositionArgIdx, gun1
CockpitArg = -2, 0150, 1, 9009, 0.0, "smooth_wrap", 0.1, "med_freq"		// RoundsInMagazineArgIdx, gun1
CockpitArg = -2, 0150, 2, 9011, 0.0, "smooth_wrap", 0.1, "med_freq"		// ReLoadingArgIdx, gun1

GunGasPoisoning = 0.016, -1, 0.042, -1, -1, -1
//1 :       /.
//2 :    
//3 :       /.
//4 :    
//5 :    
//6..11 :    

GunsmokeHatchStart=0.5	//Used by object script