module Base
{
	model Vehicles_Wagon_Wrecked_01
	{
		mesh = vehicles/Vehicles_WagonWreck_NoLFWheel,
		shader = vehicle_multiuv,
		invertX = FALSE,
		scale = 0.008,
	}
	vehicle Wagon_Wrecked_01
	{
		template! = CarStationWagon,

		model
		{
			file = Vehicles_Wagon_Wrecked_01,
			scale = 1.8200,
			offset = 0.0000 0.2692 0.0000,
		}

		skin
		{
			texture = Vehicles/vehicle_statwagonshell,
		}

		skin
		{
			texture = Vehicles/vehicle_statwagon2shell,
		}

		extents = 0.8901 0.6484 2.6044,
		physicsChassisShape = 0.8901 0.6484 2.6044,
		centerOfMassOffset = 0.0000 0.3022 0.0000,
		shadowExtents = 0.8901 2.6044,
		shadowOffset = 0.0000 0.0000,

		physics box
		{
			offset = 0.0000 0.1477 -0.0220,
			extents = 0.8681 0.3407 2.6044,
			rotate = 0.0000 0.0000 0.0000,
		}

		physics box
		{
			offset = 0.0000 0.3681 0.3272,
			extents = 0.7582 0.1648 0.4835,
			rotate = 40.0000 0.0000 0.0000,
		}

		physics box
		{
			offset = 0.0000 0.4011 -1.1795,
			extents = 0.7582 0.3407 0.1758,
			rotate = 16.0000 0.0000 0.0000,
		}

		physics box
		{
			offset = 0.0000 0.4536 -0.5110,
			extents = 0.7582 0.2637 1.4066,
			rotate = 0.0000 0.0000 0.0000,
		}

		physics box
		{
			offset = 0.0000 0.1477 -0.0220,
			extents = 0.8681 0.3407 2.6044,
			rotate = 0.0000 0.0000 0.0000,
		}

		physics box
		{
			offset = 0.0000 0.3681 0.3272,
			extents = 0.7582 0.1648 0.4835,
			rotate = 40.0000 0.0000 0.0000,
		}

		physics box
		{
			offset = 0.0000 0.4011 -1.1795,
			extents = 0.7582 0.3407 0.1758,
			rotate = 16.0000 0.0000 0.0000,
		}

		physics box
		{
			offset = 0.0000 0.4536 -0.5110,
			extents = 0.7582 0.2637 1.4066,
			rotate = 0.0000 0.0000 0.0000,
		}

		attachment trailer
		{
			offset = 0.0000 -0.2747 -1.3462,
			rotate = 0.0000 0.0000 0.0000,
			zoffset = -1.0000,
		}

		attachment trailerfront
		{
			offset = 0.0000 -0.2747 1.3187,
			rotate = 0.0000 0.0000 0.0000,
			zoffset = 1.0000,
		}
	}
	template vehicle CarStationWagon
	{
		mechanicType = 1,
		engineRepairLevel = 4,
		playerDamageProtection = 1.1,

		spawnOffsetY = 0.5,

		textureMask = Vehicles/vehicle_carstationwagon_mask,
		textureLights = Vehicles/vehicle_carnormal_lights,
		textureDamage1Overlay = Vehicles/Veh_Blood_Mask,
		textureDamage2Overlay = Vehicles/Veh_Blood_Hvy,
		textureDamage1Shell = Vehicles/Veh_Damage1,
		textureDamage2Shell = Vehicles/Veh_Damage2,
		textureRust = Vehicles/Veh_Rust,

		sound
		{
			engine = VehicleEngineCarStationWagon,
			engineStart = VehicleEngineCarStationWagon,
			engineTurnOff = VehicleEngineCarStationWagon,
			horn = VehicleHornStandard,
			ignitionFail = VehicleIgnitionFailCarStationWagon,
		}

		extents = 0.9011 0.6264 2.6593,
		mass = 900,
		physicsChassisShape = 0.9011 0.6264 2.6593,
		centerOfMassOffset = 0.0000 0.3022 -0.0385,
		engineForce = 4200,
		maxSpeed = 70f,
		engineLoudness = 80,
		engineQuality = 70,
		brakingForce = 70,
		stoppingMovementForce = 5.0f,
		rollInfluence = 1.0f,
		steeringIncrement = 0.04,
		steeringClamp = 0.3,
		suspensionStiffness = 40,
		suspensionCompression = 2.83,
		suspensionDamping = 1.88,
		maxSuspensionTravelCm = 10,
		suspensionRestLength = 0.2,
		wheelFriction = 1.4f,
		frontEndHealth = 150,
		rearEndHealth = 150,
		seats = 4,

		wheel FrontLeft
		{
			front = true,
			offset = 0.3626 -0.3187 0.8516,
			radius = 0.15f,
			width = 0.2f,
		}

		wheel FrontRight
		{
			front = true,
			offset = -0.3626 -0.3187 0.8516,
			radius = 0.15f,
			width = 0.2f,
		}

		wheel RearLeft
		{
			front = false,
			offset = 0.3626 -0.3187 -0.6099,
			radius = 0.15f,
			width = 0.2f,
		}

		wheel RearRight
		{
			front = false,
			offset = -0.3626 -0.3187 -0.6099,
			radius = 0.15f,
			width = 0.2f,
		}

		area Engine
		{
			xywh = 0.0000 1.5659 0.9011 0.4725,
		}

		area TruckBed
		{
			xywh = 0.0000 -1.5659 0.9011 0.4725,
		}

		area GasTank
		{
			xywh = 0.6868 -0.6099 0.4725 0.4725,
		}

		area TireFrontLeft
		{
			xywh = 0.6868 0.8516 0.4725 0.4725,
		}

		area TireFrontRight
		{
			xywh = -0.6868 0.8516 0.4725 0.4725,
		}

		area TireRearLeft
		{
			xywh = 0.6868 -0.6099 0.4725 0.4725,
		}

		area TireRearRight
		{
			xywh = -0.6868 -0.6099 0.4725 0.4725,
		}

		template = TrunkDoor,
		template = Trunk/part/TruckBed,

		part TruckBed
		{
			container
			{
				capacity = 60,
				test = Vehicles.ContainerAccess.TruckBedOpenInside,
			}
		}

		template = Seat/part/SeatFrontLeft,
		template = Seat/part/SeatFrontRight,
		template = Seat/part/SeatRearLeft,
		template = Seat/part/SeatRearRight,

        part GloveBox
		{
			area = SeatFrontRight,
			itemType = Base.GloveBox,
			mechanicRequireKey = true,
			durability = 3,
			container
			{
				test = Vehicles.ContainerAccess.GloveBox,
                capacity = 5,
			}
		}

		template = GasTank,

		part GasTank
		{
			install
			{
				skills = Mechanics:6,
			}

			uninstall
			{
				skills = Mechanics:6,
			}
		}

		template = CrashedBattery,
		template = Engine,
		template = Muffler,
		template = EngineDoor,

		template = Heater,
		part Heater
		{
			category = engine,

			lua
			{
				update = Vehicles.Update.Heater,
			}
		}

		part PassengerCompartment
		{
			category = nodisplay,

			lua
			{
				update = Vehicles.Update.PassengerCompartment,
			}
		}

		template = Windshield/part/Windshield,
		template = Windshield/part/WindshieldRear,
		template = Window/part/WindowFrontLeft,
		template = Window/part/WindowFrontRight,
		template = Window/part/WindowRearLeft,
		template = Window/part/WindowRearRight,
		template = Door/part/DoorFrontLeft,
		template = Door/part/DoorFrontRight,
		template = Door/part/DoorRearLeft,
		template = Door/part/DoorRearRight,
		template = Tire,
		template = Brake,
		template = Suspension,
		template = Radio,
		template = Headlight,
		
		part Headlight*
		{
			lua
			{
				create = CrashedCars.CreatVehicle,
			}
		}
		
        template = CarStationWagonCollision,

		attachment trailer
		{
			offset = 0.0000 -0.2747 -1.3736,
			rotate = 0.0000 0.0000 0.0000,
			zoffset = -1,
		}

		attachment trailerfront
		{
			offset = 0.0000 -0.2747 1.3297,
			rotate = 0.0000 0.0000 0.0000,
			zoffset = 1,
		}
	}
}
