module Base
{
	model 82porsche911taBase
	{
		mesh = vehicles/Vehicles_82porsche911_Body|p911ta_body,
		shader = damn_vehicle_shader,
		scale = 0.1,
	}
	model 82porsche911taInteriorRoof
	{
		mesh = vehicles/Vehicles_82porsche911_Body|p911ta_interior,
		texture = Vehicles/Vehicles_82porsche911_Interior,
		shader = damn_wheel_shader,
		scale = 0.1,
	}
	vehicle 82porsche911targa
	{
		mechanicType = 3,
		offRoadEfficiency = 0.8,
		engineRepairLevel = 4,
		playerDamageProtection = 1.2,

		model
		{
			file = 82porsche911taBase,
			scale = 0.9000,
			offset = 0.0000 0.5333 0.0000,
		}

		spawnOffsetY = 0,

		skin
		{
			texture = Vehicles/Vehicles_82porsche911targa_Shell_black,
		}

		skin
		{
			texture = Vehicles/Vehicles_82porsche911targa_Shell_chiffonWhite,
		}

		skin
		{
			texture = Vehicles/Vehicles_82porsche911targa_Shell_grandPrixWhite,
		}

		skin
		{
			texture = Vehicles/Vehicles_82porsche911targa_Shell_guardsRed,
		}

		skin
		{
			texture = Vehicles/Vehicles_82porsche911targa_Shell_lightBlue,
		}

		skin
		{
			texture = Vehicles/Vehicles_82porsche911targa_Shell_mintGreen,
		}

		skin
		{
			texture = Vehicles/Vehicles_82porsche911targa_Shell_mossGreen,
		}

		skin
		{
			texture = Vehicles/Vehicles_82porsche911targa_Shell_pacificBlue,
		}

		skin
		{
			texture = Vehicles/Vehicles_82porsche911targa_Shell_pewter,
		}

		skin
		{
			texture = Vehicles/Vehicles_82porsche911targa_Shell_rosewood,
		}

		skin
		{
			texture = Vehicles/Vehicles_82porsche911targa_Shell_wineRed,
		}

		skin
		{
			texture = Vehicles/Vehicles_82porsche911targa_Shell_yellow,
		}

		skin
		{
			texture = Vehicles/Vehicles_82porsche911targa_Shell_lightYellow,
		}

		skin
		{
			texture = Vehicles/Vehicles_82porsche911targa_Shell_continentalOrange,
		}

		skin
		{
			texture = Vehicles/Vehicles_82porsche911targa_Shell_mexicoBlue,
		}

		textureRust = Vehicles/Vehicles_82porsche911_Rust,
		textureMask = Vehicles/Vehicles_82porsche911_Mask,
		textureLights = Vehicles/Vehicles_82porsche911_Lights,
		textureDamage1Shell = Vehicles/Vehicles_82porsche911_Damage1,
		textureDamage2Shell = Vehicles/Vehicles_82porsche911_Damage2,
		textureDamage1Overlay = Vehicles/Vehicles_82porsche911_Blood,
		textureDamage2Overlay = Vehicles/Vehicles_82porsche911_Blood,
		textureShadow = Vehicles/Vehicles_82porsche911sc_Shadow,

		sound
		{
			engine = VehicleEngineCarNormal,
			engineStart = VehicleEngineCarNormal,
			engineTurnOff = VehicleEngineCarNormal,
			horn = VehicleHornStandard,
			ignitionFail = VehicleIgnitionFailCarNormal,
		}

		extents = 1.6444 1.0667 3.9111,
		mass = 750,
		physicsChassisShape = 1.6444 1.0667 3.9111,
		centerOfMassOffset = 0.0000 0.5333 0.0000,
		shadowExtents = 1.7466 3.9127,
		shadowOffset = -0.0111 0.0101,
		engineForce = 4150,
		maxSpeed = 100f,
		engineLoudness = 85,
		engineQuality = 89,
		brakingForce = 75,
		stoppingMovementForce = 3.5f,
		rollInfluence = 0.97f,
		steeringIncrement = 0.04,
		steeringClamp = 0.3,
		suspensionStiffness = 40,
		suspensionCompression = 3.83,
		suspensionDamping = 2.88,
		maxSuspensionTravelCm = 10,
		suspensionRestLength = 0.3,
		wheelFriction = 1.75f,
		frontEndHealth = 850,
		rearEndHealth = 450,
		seats = 2,

		wheel FrontLeft
		{
			front = true,
			offset = 0.6444 -0.4889 1.2111,
			radius = 0.29f,
			width = 0.19f,
		}

		wheel FrontRight
		{
			front = true,
			offset = -0.6444 -0.4889 1.2111,
			radius = 0.29f,
			width = 0.19f,
		}

		wheel RearLeft
		{
			front = false,
			offset = 0.6889 -0.4889 -0.9778,
			radius = 0.31f,
			width = 0.19f,
		}

		wheel RearRight
		{
			front = false,
			offset = -0.6889 -0.4889 -0.9778,
			radius = 0.31f,
			width = 0.19f,
		}

		template = PassengerSeat2,

		passenger FrontLeft
		{
			showPassenger = true,
			hasRoof = true,

			position inside
			{
				offset = 0.3111 -0.3222 -0.0778,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = 1.1111 -0.8222 -0.4778,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatFrontLeft,
			}
		}

		passenger FrontRight
		{
			showPassenger = true,
			hasRoof = true,

			position inside
			{
				offset = -0.3111 -0.3222 -0.0778,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = -1.1111 -0.8222 -0.4889,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatFrontRight,
			}
		}

		area Engine
		{
			xywh = 0.0000 -2.3444 1.0667 0.7778,
		}

		area TruckBed
		{
			xywh = 0.0000 2.3444 1.3333 0.7778,
		}

		area Roofrack
		{
			xywh = 0.0000 -0.1000 3.0889 1.6222,
		}

		area SeatFrontLeft
		{
			xywh = 1.2111 0.1222 0.7778 0.8889,
		}

		area SeatFrontRight
		{
			xywh = -1.2111 0.1222 0.7778 0.8889,
		}

		area SeatRearRight
		{
			xywh = -1.2111 -0.5000 0.7778 0.3556,
		}

		area SeatRearLeft
		{
			xywh = 1.2111 -0.5000 0.7778 0.3556,
		}

		area GasTank
		{
			xywh = 1.2111 0.9778 0.7778 0.7778,
		}

		area TireFrontLeft
		{
			xywh = 1.3222 1.2222 0.4222 0.4222,
		}

		area TireFrontRight
		{
			xywh = -1.3222 1.2222 0.4222 0.4222,
		}

		area TireRearLeft
		{
			xywh = 1.3222 -0.9778 0.4222 0.4222,
		}

		area TireRearRight
		{
			xywh = -1.3222 -0.9778 0.4222 0.4222,
		}

		template = PRS82TiresSC,
		template = PRS82Seats,
		template = PRS82FrontBumpersSC,
		template = PRS82RearBumpersSC,
		template = PRS82EngineDoorSC,
		template = PRS82TrunkDoors,
		template = PRS82TrunkCompartment,
		template = PRS82InnerTrunkCompartment,
		template = PRS82DoorsTA,
		
		template = PRS82ArmorTA,
		template = PRS82SpareTire,
		template = PRS82RoofrackTA,
		template = PRS82SpoilerSC,
		template = PRS82RoofTA,

		part GloveBox
		{
			area = SeatFrontRight,
			itemType = Base.GloveBox,
			mechanicRequireKey = true,

			model PRS82int
			{
				file = 82porsche911Interior,
			}

			model PRS82intSC
			{
				file = 82porsche911SCInterior,
			}

			model PRS82intRoofta
			{
				file = 82porsche911taInteriorRoof,
			}

			container
			{
				capacity = 7,
				test = Vehicles.ContainerAccess.GloveBox,
			}

			lua
			{
				create = Vehicles.Create.Default,
			}
		}

		template = GasTank,

		part GasTank
		{
			table install
			{
				door = TrunkDoor,
				recipes = Intermediate Mechanics,
			}

			table uninstall
			{
				recipes = Intermediate Mechanics,
			}
		}

		template = Battery,

		part Battery
		{
			area = TruckBed,

			table install
			{
				door = TrunkDoor,
			}
		}

		template = Engine,
		template = Muffler,

		part Muffler
		{
			model superMuff4003
			{
				file = 82porsche911SCExhaust,
			}

			area = Engine,

			table install
			{
				recipes = Intermediate Mechanics,
			}

			table uninstall
			{
				recipes = Intermediate Mechanics,
			}
		}

		part Heater
		{
			category = engine,

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

		part PassengerCompartment
		{
			category = nodisplay,

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

		template = Brake,

		part Brake*
		{
			table install
			{
				skills = Mechanics:6,
				recipes = Intermediate Mechanics,
			}

			table uninstall
			{
				skills = Mechanics:6,
				recipes = Intermediate Mechanics,
			}
		}

		template = Suspension,

		part Suspension*
		{
			table install
			{
				skills = Mechanics:6,
				recipes = Intermediate Mechanics,
			}

			table uninstall
			{
				skills = Mechanics:6,
				recipes = Intermediate Mechanics,
			}
		}

		template = Radio,
		template = Headlight,

		part HeadlightLeft
		{
			area = TruckBed,
		}

		part HeadlightRight
		{
			area = TruckBed,
		}

		part HeadlightRearLeft
		{
			area = Engine,
		}

		part HeadlightRearRight
		{
			area = Engine,
		}

        template = PRS82WindowsTA,
		template = PRS82WindshieldsTA,

		useChassisPhysicsCollision = false,

		physics box
		{
			offset = 0.0000 0.3182 0.0000,
			extents = 1.5556 0.6222 4.0222,
			rotate = 0.0000 0.0000 0.0000,
		}

		physics box
		{
			offset = 0.0000 0.7556 0.5085,
			extents = 1.2222 0.6444 0.2000,
			rotate = -50.0000 0.0000 0.0000,
		}

		physics box
		{
			offset = 0.0000 0.8333 -0.1320,
			extents = 1.2222 0.4222 0.9111,
			rotate = 0.0000 0.0000 0.0000,
		}

		physics box
		{
			offset = 0.0000 0.6889 -1.0455,
			extents = 1.2222 0.3111 1.1111,
			rotate = -22.0000 0.0000 0.0000,
		}

		attachment trailer
		{
			offset = 0.0000 -0.3222 -2.0667,
			rotate = 0.0000 0.0000 0.0000,
			zoffset = -1.0000,
		}

		attachment trailerfront
		{
			offset = 0.0000 -0.3222 2.0778,
			rotate = 0.0000 0.0000 0.0000,
			zoffset = 1.0000,
		}
	}
}
