<_templates Include="trucks">
	<Wheel>
		<TrailerWheel
			HardpointOffsetY="-0.01"
			SuspensionMin="-0.4"
			SuspensionStrength="0.02"
			Torque="default"
			Type="maintainer_saddle"
		/>
	
	</Wheel>
	<Flare>
		<IgnitionSignalGreen
			AspectRatio="1.4"
			Color="g(165; 149; 130) x 0.6"
			DirAngle="90"
			Size="0.4"
		/>
		<IgnitionSignalRed1
			AspectRatio="1.4"
			Color="g(169; 65; 26) x 0.4" 
			DirAngle="90"
			Size="0.5"
		/>
	</Flare>
	<Light>
		<IgnitionSignalGreen
			AttenEnd="1"
			Color="g(200; 253; 200) x 4" 
			InnerCone="10"
			OuterCone="180"
		/>
	</Light>
	
</_templates>
<Truck>
	<Wheels
		HardpointDefaultY="0.513"
		HardpointDefaultZ="1.083"
	>
		<Wheel _template="TrailerWheel" HardpointX="-4.018" />
		<Wheel _template="TrailerWheel" HardpointX="-4.018" RightSide="true" />
		<Wheel _template="TrailerWheel" HardpointX="-5.358" />
		<Wheel _template="TrailerWheel" HardpointX="-5.358" RightSide="true" />
	</Wheels>
	<TruckData RepairsCapacity="1200"
	>
		<OcclusionMap
			HalfSizeZ="1.842"
			MinX="-8"
			MaxX="3.7"
			Texture="trucks/occlusion/chassis_trailer__s_d_a.tga"
		/>

		<Constraint _template="TrailerRagdoll" />
		<Camera Center="(-4.5; 0; 0)" />
		<Axles>
			<Axle Frame="BoneAxle0" />
			<Axle Frame="BoneAxle1" />
		</Axles>
	</TruckData>
	<PoweredConstraints>
		<Group Id="_trailer_foot">
			<Constraint InitialFix="true" Name="Leg" Position="65" Tau="0.04" TerminalFix="true" />
		</Group>
	</PoweredConstraints>
	<PhysicsModel Mesh="trucks/maintainer_saddle">
		<Body CenterOfMassOffset="(-.7; 0; 0)" ImpactType="Truck" Mass="4000">
			<Body Mass="300" NoFoliageCollisions="true" ModelFrame="BoneLeg_cdt">
				<Constraint AxisLocal="(0; 0; 1)" MinLimit="0" MaxLimit="65" Name="Leg" Type="Hinge" >
					<Motor Force="30000" Type="Position" />
				</Constraint>	
			</Body>				
		</Body>
	</PhysicsModel>
	<ModelAttachments>
		<Ignition>
			<Flare _template="IgnitionSignalGreen" Pos="(-6.801; 3.125; -0.068)" Dir="(-1; 0; 0)" />
			<Flare _template="IgnitionSignalGreen" Pos="(-6.801; 3.116; -1.357)" Dir="(-1; 0; 0)" />
			<Light _template="IgnitionSignalGreen" Pos="(0.335; 4.067; 0.983)" Dir="(-0.754; -0.176; -0.632)"/>
			<Flare _template="IgnitionSignalGreen" Pos="(0.335; 4.067; 0.983)" Dir="(-0.754; -0.176; -0.632)" />
			<Light _template="IgnitionSignalGreen" Pos="(0.335; 4.067; -0.983)" Dir="(-0.754; -0.176; 0.632)"/>
			<Flare _template="IgnitionSignalGreen" Pos="(0.335; 4.067; -0.983)" Dir="(-0.754; -0.176; 0.632)" />
			<Light _template="IgnitionSignalGreen" Pos="(-4.520; 3.118; 1.308)" Dir="(0; 0; 1)"/>
			<Flare _template="IgnitionSignalGreen" Pos="(-4.520; 3.118; 1.308)" Dir="(0; -0.120; 0.993)" />
			<Light _template="IgnitionSignalGreen" Pos="(-6.207; 3.118; 1.308)" Dir="(0; 0; 1)"/>
			<Flare _template="IgnitionSignalGreen" Pos="(-6.207; 3.118; 1.308)" Dir="(0; 0; 1)" />
			<Light _template="IgnitionSignalGreen" Pos="(-4.520; 3.118; -1.308)" Dir="(0; 0; -1)"/>
			<Flare _template="IgnitionSignalGreen" Pos="(-4.520; 3.118; -1.308)" Dir="(0; -0.120; -0.993)" />
			<Light _template="IgnitionSignalGreen" Pos="(-6.207; 3.118; -1.308)" Dir="(0; 0; -1)"/>
			<Flare _template="IgnitionSignalGreen" Pos="(-6.207; 3.118; -1.308)" Dir="(0; 0; -1)" />			
			<Flare _template="IgnitionSignalRed1" Pos="(0.272; 3.760; -1.271)" Dir="(-1.0; -0.2; 0)"/>
			<Flare _template="IgnitionSignalRed1" Pos="(0.272; 3.760; 1.271)" Dir="(-1.0; -0.2; 0)"/>
			<Flare _template="IgnitionSignalRed1" Pos="(2.699; 3.766; -1.273)" Dir="(1.0; -0.2; 0)"/>
			<Flare _template="IgnitionSignalRed1" Pos="(2.699; 3.766; 1.273)" Dir="(1.0; -0.2; 0)"/>
		</Ignition>
	</ModelAttachments>
	<GameData GaragePoints="4">
		<WinchSocket Pos="(-6.591; 0.804; 0.75)" />
		<WinchSocket Pos="(-6.591; 0.804; -0.75)" />
		<WinchSocket Pos="(-0.676; 1.744; 1.339)" />
		<WinchSocket Pos="(-0.676; 1.744; -1.339)" />
		<WinchSocket Pos="(2.117; 1.377; 0)" />
		<RequiredAddon Types="saddle" />
		<InstallSocket Offset="(2.117; 1.377; 0)" Type="MaintainerSaddle" />
	</GameData>
	<AutomaticIK>
		<IKBone ModelFrame="BoneLeg" ParentFrame="BoneRoot_cdt">
			<IKJoint AxisLocal="(0;0;1)" Type="Hinge" />
			<IKBone
				AttachOffset="(0; -.9; 0)"
				AttachToFrame="BoneLeg_cdt"
				ModelFrame="BoneLegPiston"
			>
				<IKJoint AxisLocal="(0;1;0)" Type="Slider" MinLimit="0" MaxLimit=".49"/>
			</IKBone>
		</IKBone>			
	</AutomaticIK>	

</Truck>
