<_templates Include="trucks">
	<Wheel>
		<RearWheel
			ConnectedToHandbrake="true"			
			SuspensionMin="-0.2"
			HardpointOffsetY="-0.1"
			SuspensionStrength="0.06"
			SuspensionDamping="0.57"
			Torque="default"
			Type="maz538"
		/>
		<FrontWheel
		    ConnectedToHandbrake="true"			
			SteeringAngle="36"
			SteeringCastor="5"
			SteeringJointOffset="0.2"			
			SuspensionMin="-0.3"
			HardpointOffsetY="-0.2"
			SuspensionStrength="0.03"
			SuspensionDamping="0.29"
			Torque="full"
			Type="maz538"
			ParentFrame="BoneCabin_cdt"
		/>
	</Wheel>
	<Body>
		<MazMudguard ImpactType="Truck">
			<Constraint
				AxisLocal="(1; 0; 0)"
				MinLimit="-10"
				MaxLimit="0"
				Type="Hinge"
			>
				<Motor Damping="120" Spring="1000" Type="Spring" />
			</Constraint>
		</MazMudguard>
	</Body>
	<!--<Body>
		<BackLight
		CenterOfMassOffset="(0.143; 0.194; 0)"
		ImpactType="Truck"
		Mass="1"
		>
			<Constraint
				AxisLocal="(1; 0; 0)"
				MinLimit="-10"
				MaxLimit="10"
				Type="Hinge"
			>
				<Motor Damping="1" Spring="250" Type="Spring" />
			</Constraint>
		</BackLight>	
	</Body>-->
</_templates>
<Truck>
	<Wheels
		HardpointDefaultY="0.9"
		HardpointDefaultZ="1.275"
	>
		<Wheel _template="FrontWheel" HardpointX="3.468" />
		<Wheel _template="FrontWheel" HardpointX="3.468" RightSide="true" />
		<Wheel _template="RearWheel" HardpointX="-0.762" />
		<Wheel _template="RearWheel" HardpointX="-0.762" RightSide="true" />
	</Wheels>
	<TruckData
		BackSteerSpeed="0.015"
		DiffLockType="Always"
		EngineIconMesh="env/engine_big"
		EngineIconScale="1.4"
		EngineStartDelay="0.8"
		ExhaustStartTime="0.9"
		FuelCapacity="840"
		LockClothOrigin="(2.25; -0.45; 0)"
		LockClothScale="1.1"
		Responsiveness="0.6"
		SteerSpeed="0.018"
	>
		<SteeringWheel Frame="BoneSteering" />
		<SteeringRack
			Frame="BoneRack"
			FrameSteerLeft="BoneRackLeft"
			FrameSteerRight="BoneRackRight"
			RackHalfSizeZ="1.0"
		/>
		<Steam Origin="(1.5; 1.343; 0)" />
		<Steam Origin="(3.75; 1.5; 0)" Scale="0.5" ParentFrame="BoneCabin_cdt" />
		<Sounds _template="Default" Origin="(3.26; 1.8; 0)">
			<EngineStop Sound="maz538_stop" />
			<EngineStart Sound="maz538_start" />
			<EngineRev Sound="maz538_rev" />
			<EngineLow Sound="maz538_low" />
			<EngineIdle Sound="maz538_idle" />
			<EngineHigh Sound="maz538_high" />
			<EngineHeavy Sound="maz538_heavy" />
		</Sounds>
		<Shakers>
			<Shaker Frame="BoneExhaustLeft" MaxAngle="(2; 2; 0)" MaxFrequency="4" />
			<Shaker Frame="BoneExhaustRight" MaxAngle="(2; 2; 0)" MaxFrequency="4" />
		</Shakers>
		<Shafts>
			<Shaft SocketPointA="Shaft1a" SocketPointB="Shaft1b" />
			<Shaft SocketPointA="Shaft2a" SocketPointB="Shaft2b" />
			<Shaft SocketPointA="Shaft3a" SocketPointB="Shaft3b" />
			<Shaft SocketPointA="Shaftfla" SocketPointB="Shaftflb" />
			<Shaft SocketPointA="Shaftfra" SocketPointB="Shaftfrb" />
		</Shafts>
		<OcclusionVolume
			HalfSizeZ="1.721"
			HeightFront="1.6"
			HeightRear="1.183"
			MinX="-1.45"
			MaxX="4.88"
		>
			<FullOcclusion HeightFront="1.5" HeightRear="1.4" />
		</OcclusionVolume>
		<OcclusionMap HalfSizeZ="1.836" MinX="-2.586" MaxX="5.591" />
		<Motor BrakesDelay="0.5" MaxDeltaAngVel="1.02" Torque="340000" EngineResponsiveness="0.4" ClutchDelay="0.09" >
			<ReverseGear AngVel="0.15" />
			<HighGear AngVel="5.0" />
			<Gear AngVel="0.1" />
			<Gear AngVel="1.6" />
			<Gear AngVel="3.1" />
		</Motor>
		<LimitedFluid
			Center="(0.972; 1.15; 1.267)"
			SizeX="1.127"
			SizeY="0.69"
			SizeZ="0.58"
			Type="Box"
		/>
		<Intake Dir="(1.0; 0; 0)" Origin="(4.801; 1.545; -0.412)" Size="1" />
		<Intake Dir="(1.0; 0; 0)" Origin="(4.801; 1.545; 0.412)" Size="1" />
		<Intake Dir="(0.711; 0.703; 0)" Origin="(3.035; 2.519; 0)" Size=".3" />
		<Exhaust Dir="(0; -0.854; 0.520)" Origin="(4.418; 1.481; 1.501)" Speed="4.2" />
		<Exhaust Dir="(0; -0.803; -0.596)" Origin="(4.418; 1.481; -1.501)" Speed="4.2" />
		<Driver Pos="(1.744; 2.131; 0.442)" SteeringWheelPos="(2.051; 2.542; 0.435)" ParentFrame="BoneCabin_cdt" />
		<Damage
			Capacity="800"
			SensationMin="(1.4; 2.5; -0.7)"
			SensationMax="(2.4; 3.08; 0.7)"
			ParentFrame="BoneCabin_cdt"
		/>
		<Camera ParentFrame="BoneCabin_cdt">
			<Cockpit
				_template="Default"
				ControlsDiffuse="g(62; 64; 59)"
				ControlsPos="(2.23; 2.55; 0.519)"
				LimitsHor="(-1.4; 2.4)"
				ViewPos="(1.62; 2.81; 0.393)"
				WindshieldDiffuseTexture="maz538_glass__d_a.tga"
			>
				<Rear _inheritRemove="true" />
			</Cockpit>
		</Camera>
		<Axles>
			<Axle Frame="BoneAxleFrontLeft" IsIndependent="true" />
			<Axle Frame="BoneAxleFrontRight" IsIndependent="true" />
			<Axle Frame="BoneAxleRear" />
		</Axles>
	</TruckData>
	<PhysicsModel Mesh="trucks/maz538">
		<Body
			CenterOfMassOffset="(-1.56; 0.0; 0)"
			ImpactType="Truck"
			Mass="9000"
		>
			<Body
				CenterOfMassOffset="(-0.22; 0.0; 0)"
				ImpactType="Truck"
				Mass="14000"
				ModelFrame="BoneCabin_cdt"
			>
				<Constraint
					AxisLocal="(1;0;0)"
					MinLimit="-22"
					MaxLimit="22"
					PivotOffset="(0; 0; 0.0)"
					Type="Hinge"
				>
					<Motor Damping="100000" Spring="1000000" Type="Spring" />
				</Constraint>
				<Body _template="SideMirror" ModelFrame="BoneMirrorLeft_cdt" />
				<Body _template="SideMirror" ModelFrame="BoneMirrorRight_cdt" />
			</Body>
			<!--<Body _template="BackLight" ModelFrame="BoneBackLightRight_cdt"/>
			<Body _template="BackLight" Mass = "1.1" ModelFrame="BoneBackLightLeft_cdt"/>-->
			<Body _template="MazMudguard" Mass="20" ModelFrame="BoneMudguardLeft_cdt" />
			<Body _template="MazMudguard" Mass="21" ModelFrame="BoneMudguardRight_cdt" />
		</Body>
	</PhysicsModel>
	<ModelAttachments>
		<!--<StopSignals>
			<Light _template="StopSignal" Pos="(0.815; 2.311; 0)" />
			<Flare _template="StopSignal" Pos="(1.245; 2.703; 0.838)" />
			<Flare _template="StopSignal" Pos="(1.245; 2.703; -0.838)" />
		</StopSignals>-->
		<!--	<ReverseSignals>
			<Light _template="ReverseSignal" Pos="(-2.19; 1.555; 0)" />
			<Flare _template="ReverseSignal" Pos="(-1.679; 2.418; 1.338)" />
			<Flare _template="ReverseSignal" Pos="(-1.679; 2.418; -1.338)" />
			<Flare _template="BlueStreak" Dir="(-1; 0; 0)" Pos="(-1.679; 2.418; 1.338)" />
			<Flare _template="BlueStreak" Dir="(-1; 0; 0)" Pos="(-1.679; 2.418; -1.338)" />
		</ReverseSignals>-->
		<Ignition>
			<Light
				_template="IgnitionSignalWhite"
				Dir="(1;0;0)"
				Pos="(4.641; 1.79; 0)"
				ParentFrame="BoneCabin_cdt"
			/>
			<Light _template="IgnitionSignalRed" Pos="(1.245; 2.703; 0.838)" ParentFrame="BoneCabin_cdt" />
			<Light _template="IgnitionSignalRed" Pos="(1.245; 2.703; -0.838)" ParentFrame="BoneCabin_cdt" />
			<Flare
				_template="IgnitionSignalWhite"
				Dir="(1;0;0)"
				Pos="(4.941; 1.79; -1.235)"
				ParentFrame="BoneCabin_cdt"
			/>
			<Flare
				_template="IgnitionSignalWhite"
				Dir="(1;0;0)"
				Pos="(4.941; 1.79; 1.235))"
				ParentFrame="BoneCabin_cdt"
			/>
			<Flare _template="IgnitionSignalRed" Pos="(1.245; 2.703; 0.838)" ParentFrame="BoneCabin_cdt" />
			<Flare _template="IgnitionSignalRed" Pos="(1.245; 2.703; -0.838)" ParentFrame="BoneCabin_cdt" />
		</Ignition>
		<HeadLight>
			<Model _template="HeadLightRay" Org="(4.974; 1.871; -1.041)" ParentFrame="BoneCabin_cdt" />
			<Model _template="HeadLightRay" Org="(4.974; 1.871; 1.041)" ParentFrame="BoneCabin_cdt" />
			<Flare _template="HeadLight" Pos="(4.974; 1.871; -1.041)" ParentFrame="BoneCabin_cdt" />
			<Flare _template="HeadLight" Pos="(4.974; 1.871; 1.041)" ParentFrame="BoneCabin_cdt" />
			<Flare _template="BlueStreak" Pos="(4.974; 1.871; -1.041)" ParentFrame="BoneCabin_cdt" />
			<Flare _template="BlueStreak" Pos="(4.974; 1.871; 1.041)" ParentFrame="BoneCabin_cdt" />
		</HeadLight>
	</ModelAttachments>
	<HeadLight _template="Default" Pos="(4.413; 1.281; 0)" ParentFrame="BoneCabin_cdt" />
	<GameData BalancePoints="4" LogPoints="4">
		<WinchSocket Pos="(5.139; 0.986; 0)" ParentFrame="BoneCabin_cdt" />
		<WinchSocket Pos="(-1.97; 0.87; 0)" />
		<WinchSocket Pos="(1.55; 0.725; 1.541)" />
		<WinchSocket Pos="(1.6; 0.725; -1.541)" />
		<CompletionStarsDecal Dir="(0; 0; 1)" Pos="(2.937; 2.176; 0.806)" />
		<AddonSockets>
			<Socket Names="Maz538Cart" />
		</AddonSockets>
		<AddonSockets>
			<Socket Names="KamazTrailerCart" Offset="(-1.97; 0.87; 0)" />
			<Socket Names="MazTrailerCart" Offset="(-1.97; 0.87; 0)" />
		</AddonSockets>
	</GameData>
</Truck>
