<_templates Include="trucks">
	<Wheel>
		<RearWheel
			ConnectedToHandbrake="true"
			HardpointZ="0.95"		
			HardpointOffsetY="-0.2"
			SuspensionMin="-0.6"
			SuspensionStrength="0.014"
			Torque="default"
			ParentFrame="BoneRear_cdt"			
			Type="zil_offroad"
		/>
		<FrontWheel
			HardpointOffsetY="-0.2"
			SteeringAngle="40"
			SteeringCastor="12"
			SuspensionMin="-1.0"
			SuspensionStrength="0.02"
			Torque="full"
			Type="zil_offroad"
		/>
	</Wheel>
	<Flare>
		<Sublight Color="(122; 61; 0) x 0.6" Size="0.5" />
	</Flare>
</_templates>
<Truck>
	<Wheels
		HardpointDefaultY="0.8"
		HardpointDefaultZ="0.9"
	>
		<Wheel _template="FrontWheel" HardpointX="1.017" />
		<Wheel _template="FrontWheel" HardpointX="1.017" RightSide="true" />
		<Wheel _template="RearWheel" HardpointX="-2.42" />
		<Wheel _template="RearWheel" HardpointX="-2.42" RightSide="true" />
		<Wheel _template="RearWheel" HardpointX="-3.66" />
		<Wheel _template="RearWheel" HardpointX="-3.66" RightSide="true" />
	
	</Wheels>
	<TruckData
		BackSteerSpeed="0.01"
		EngineIconMesh="env/engine_default"
		EngineIconScale="1.15"
		EngineStartDelay="2.2"
		ExhaustStartTime="1.2"
		FuelCapacity="270"
		LockClothOrigin="(-0.5; 0.2; 0)"
		LockClothScale="0.85"
		Responsiveness="0.08"
		SteerSpeed="0.04"
	>
		<SteeringWheel Frame="BoneSteering" />
		<SteeringRack
			Frame="BoneRack"
			FrameSteerLeft="BoneRackLeft"
			FrameSteerRight="BoneRackRight"
			RackHalfSizeZ="0.679"
		/>		
		<Steam Origin="(4.156; 0.796; 0)" />
		<Steam Origin="(4.343; 1.247; 0)" Scale="0.5" ParentFrame="BoneCabin_cdt" />
		<Sounds
			_template="Default"
			EngineHeavyVolume="0.8"
			Origin="(0.9; 1.55; 0)"
			ParentFrame="BoneCabin_cdt"
		>
			<Reverse _inheritRemove="true" />
			<EngineStop Sound="engine/zil_stop" />
			<EngineStart Sound="zil_offroad_start" />
			<EngineLow Sound="zil_offroad_low" />
			<EngineIdle Sound="zil_offroad_idle" />
			<EngineHigh Sound="zil_offroad_high" />
			<EngineHeavy Sound="zil_offroad_heavy" />
		</Sounds>
		<Shafts>
			<Shaft SocketPointA="Shaft1a" SocketPointB="Shaft1b" />
			<Shaft SocketPointA="Shaft2a" SocketPointB="Shaft2b" />
			<Shaft SocketPointA="Shaft3a" SocketPointB="Shaft3b" />
		    <Shaft SocketPointA="Shaft4a" SocketPointB="Shaft4b" />
		</Shafts>
		<OcclusionVolume
			HalfSizeZ="1.40"
			HeightFront="1.1"
			HeightRear="0.7"
			MinX="-2.50"
			MaxX="2.50"
		>
			<FullOcclusion HeightRear="1.0" />
		</OcclusionVolume>
		<OcclusionMap HalfSizeZ="1.6" MinX="-4.0" MaxX="1.1" />
		<Motor MaxDeltaAngVel="0.01" Torque="165000">
			<ReverseGear AngVel="1.0" />
			<HighGear AngVel="16.0" />
			<Gear AngVel="2.0" />
			<Gear AngVel="3.9" />
			<Gear AngVel="7.7" />
			<Gear AngVel="10.5" />
			<Gear AngVel="14.0" />
		</Motor>
		<Intake Dir="(1.0; 0; 0)" Origin="(2.295; 1.351; 0.001)" Size="0.8" />		
		<Exhaust Dir="(0.00; -0.37; 0.93)" Origin="(-1.629; 0.635; 0.258)" Speed="3.77" />
	       <Driver Pos="(-0.201; 1.6; 0.459)" SteeringWheelPos="(0.094; 2.085; 0.45)" ParentFrame="BoneCabin_cdt" />
		<Damage
			Capacity="800"
			SensationMin="(0.16; 1.67; -0.95)"
			SensationMax="(1.07; 2.27; 0.95)"
		/>
		<Camera RadiusMultiplier="0.9" Center="(-2.1; 1.0; 0.2)" ParentFrame="BoneCabin_cdt">
			<Cockpit
				_template="Default"
				ControlsDiffuse="g(65; 67; 62)"
				ControlsPos="(-0.2; 1.95; 0.459)"
				ViewPos="(-0.38; 2.42; 0.43)"
				WindshieldDiffuseTexture="trucks/zil131_glass__d_a.tga"
			/>
		</Camera>
		<Axles>
			<Axle Frame="BoneAxle1" LeftWheel="0" RightWheel="1" />
			<Axle Frame="BoneAxle2" LeftWheel="2" RightWheel="3" />
		    <Axle Frame="BoneAxle3" LeftWheel="4" RightWheel="5" />
		</Axles>
	</TruckData>
	<PhysicsModel Mesh="trucks/zil131_ac_40">
		<Body ImpactType="Truck" Mass="3200"  CenterOfMassOffset="(-1.0; -0.35; 0)" >
			<Body ImpactType="Truck" Mass="2500" ModelFrame="BoneCabin_cdt">
				<Constraint
					AxisLocal="(1;0;0)"
					MinLimit="-3"
					MaxLimit="3"
					Type="Hinge"
				>
					<Motor Damping="20000" Spring="280000" Type="Spring" />
				</Constraint>
			<Body
					Collisions="None"
					Mass="150"
					ModelFrame="BoneRul_cdt"
					ParentFrame="BoneCabin_cdt"
				>
					<Constraint
						AxisLocal="(0;-1;0)"
						MinLimit="-*"
						MaxLimit="*"
						Name="ChassisSteer"
						Type="Hinge"
						ParentFrame="BoneCabin_cdt"
					>
						<Motor
							Damping="0.5"
							Force="350"
							Tau="0.04"
							Type="Position"
						/>
					</Constraint>
				</Body>	
			</Body>	
		    <Body ImpactType="Truck" Mass="1500" ModelFrame="BoneRear_cdt">
				<Constraint
					AxisLocal="(1;0;0)"
					MinLimit="-10"
					MaxLimit="10"
					Type="Hinge"
				>
					<Motor Damping="20000" Spring="280000" Type="Spring" />
				</Constraint>
			</Body>	
		</Body>
	</PhysicsModel>
		<ModelAttachments>
		<Ignition>
			<Flare _template="Sublight" Pos="(1.654; 1.405; 0.983)" ParentFrame="BoneCabin_cdt" />
			<Flare _template="Sublight" Pos="(1.654; 1.405; -0.983)" ParentFrame="BoneCabin_cdt" />
		</Ignition>
	 	<StopSignals>
			<Light
				Pos="(-4.84; 0.0; 0)"
				AttenEnd="2.0"
				Color="(102; 1; 1) x 4"
				Dir="(-1.0; -0.2; 0)"
				InnerCone="120"
				OuterCone="160"
			/>
			<Flare
				Pos="(-4.84; 1.607; 0.716)"
				Color="g(169; 0; 0)"
				Dir="(-1;0;0)"
				ParentFrame="BoneRear_cdt"
				DirAngle="80"
				Size="0.4"
			/>
			<Flare
				Pos="(-4.84; 1.607; -0.779)"
				Color="g(169; 0; 0)"
				Dir="(-1;0;0)"
				ParentFrame="BoneRear_cdt"
				DirAngle="80"
				Size="0.4"
			/>
		</StopSignals>
	 <HeadLight>
			<Flare
				Pos="(1.658; 1.457; 0.811)"
				Color="g(141; 133; 117) x 2"
				Dir="(1.0; 0; 0)"
				DirAngle="250"
				ParentFrame="BoneCabin_cdt"
				Size="0.35"
			/>
			<Flare
				Pos="(1.658; 1.457; -0.811)"
				Color="g(141; 133; 117) x 2"
				Dir="(1.0; 0; 0)"
				DirAngle="250"
				ParentFrame="BoneCabin_cdt"
				Size="0.35"
			/>		
		</HeadLight>
	</ModelAttachments>
	<HeadLight _template="Default" Pos="(2.58; 1.275; 0.0)" ParentFrame="BoneCabin_cdt" />
	<GameData BalancePoints="1" ExcludeAddons="trailer_tent">
	    <LoadArea Min="(-0.0; -1.0; -2.5)" Max="(-5.0; 3.0; 2.5)" Type="ShortLogs" />
		<LoadArea Min="(-0.0; -1.0; -2.5)" Max="(-5.0; 3.0; 2.5)" Type="ShortLogs" />
		<WinchSocket Pos="(1.991; 1.261; -0.457)" ParentFrame="BoneChassis_cdt" />
		<WinchSocket Pos="(1.991; 1.261; 0.433)" ParentFrame="BoneChassis_cdt" />
		<WinchSocket Pos="(-3.281; 2.528; -0.956)" ParentFrame="BoneCabin_cdt" />
		<WinchSocket Pos="(-3.281; 2.528; 0.91)" ParentFrame="BoneCabin_cdt" />		
		<WinchSocket Pos="(-4.873; 0.86; 0)" ParentFrame="BoneChassis_cdt" />
		<AddonSockets>
			<Socket Names="GazTrailer" Offset="(-4.873; 1.032; 0)" />
		</AddonSockets>				
		<AddonSockets>
			<Socket Names="zapaska_zil131_ac40" Offset="(0.0; -0.0; 0)" />
		</AddonSockets>		
		<AddonSockets>
			<Socket Names="gruz_zil131_ac40" Offset="(0.0; -0.0; 0)" />
		</AddonSockets>
	</GameData>
	<ControlledConstraints>
		<Constraint Id="stering" IsLinkedSteering="true" Name="ChassisSteer" />
	</ControlledConstraints>
</Truck>
