module Base
{
	model fhqImprezaWag
	{
		mesh = vehicles/vehicle_fhqimprezawag|fhqimprezaWag,
		shader = vehicle_multiuv,
		invertX = FALSE,
		scale = 1,
	}
	model fhqImprezaWagExh
	{
		mesh = vehicles/vehicle_fhqimprezawag|fhqimprezaexhaust,
		shader = vehicle_multiuv,
		invertX = FALSE,
		scale = 1,
	}
	vehicle fhqImprezaWag
	{
		mechanicType = 1,
		offRoadEfficiency = 0.9,
		engineRepairLevel = 5,
		playerDamageProtection = 0.8,

		model
		{
			file = fhqImprezaWag,
			scale = 0.7000,
			offset = 0.0000 0.3521 -0.0986,
		}

		spawnOffsetY = 0.12999995,

		skin
		{
			texture = Vehicles/vehicle_fhqImprezaWag_shell,
		}

		textureMask = Vehicles/vehicle_fhqImprezaWag_mask,
		textureLights = Vehicles/vehicle_fhqImpreza_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 = VehicleEngineSmallCar,
			engineStart = VehicleEngineSmallCar,
			engineTurnOff = VehicleEngineSmallCar,
			horn = VehicleHornStandard,
			ignitionFail = VehicleIgnitionFailSmallCar,
		}

		extents = 2.0845 1.4648 5.4085,
		mass = 820,
		physicsChassisShape = 2.0845 1.4648 5.4085,
		centerOfMassOffset = 0.0000 0.7183 0.0000,
		shadowExtents = 2.3035 5.6723,
		shadowOffset = 0.0000 0.0260,
		engineForce = 3000,
		engineLoudness = 70,
		engineQuality = 70,
		maxSpeed = 90f,
		gearRatioCount = 5,
		stoppingMovementForce = 2.0f,
		rollInfluence = 0.7f,
		steeringIncrement = 0.04,
		steeringClamp = 0.3,
		suspensionStiffness = 35,
		suspensionCompression = 2.63,
		suspensionDamping = 2.08,
		maxSuspensionTravelCm = 20,
		suspensionRestLength = 0.4f,
		wheelFriction = 1.8f,
		frontEndHealth = 150,
		rearEndHealth = 150,
		seats = 4,

		wheel FrontLeft
		{
			front = true,
			offset = 0.8310 -0.4789 1.6761,
			radius = 0.37f,
			width = 0.22f,
		}

		wheel FrontRight
		{
			front = true,
			offset = -0.8310 -0.4789 1.6761,
			radius = 0.37f,
			width = 0.22f,
		}

		wheel RearLeft
		{
			front = false,
			offset = 0.8451 -0.4789 -1.4507,
			radius = 0.37f,
			width = 0.22f,
		}

		wheel RearRight
		{
			front = false,
			offset = -0.8451 -0.4789 -1.4507,
			radius = 0.37f,
			width = 0.22f,
		}

		template = PassengerSeat4,

		passenger FrontLeft
		{
			position inside
			{
				offset = 0.5070 0.0986 0.0704,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = 1.5211 -0.6761 0.4930,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatFrontLeft,
			}
		}

		passenger FrontRight
		{
			position inside
			{
				offset = -0.5070 0.0845 0.0704,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = -1.5211 -0.6620 0.4930,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatFrontRight,
			}
		}

		passenger RearLeft
		{
			position inside
			{
				offset = 0.5211 0.0845 -1.0282,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = 1.5211 -0.6620 -0.7606,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatRearLeft,
			}
		}

		passenger RearRight
		{
			position inside
			{
				offset = -0.5211 0.0845 -1.0282,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = -1.5211 -0.6620 -0.7606,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatRearRight,
			}
		}

		area Engine
		{
			xywh = 0.0000 3.3000 2.2000 1.2000,
		}

		area TruckBed
		{
			xywh = 0.0000 -3.2714 2.2286 1.1429,
		}

		area SeatFrontLeft
		{
			xywh = 1.6286 0.4286 1.1714 1.1714,
		}

		area SeatFrontRight
		{
			xywh = -1.6286 0.4286 1.1714 1.1714,
		}

		area SeatRearLeft
		{
			xywh = 1.6286 -0.8571 1.1714 1.1714,
		}

		area SeatRearRight
		{
			xywh = -1.6286 -0.8571 1.1714 1.1714,
		}

		area GasTank
		{
			xywh = -1.3429 -1.9571 0.6000 0.6000,
		}

		area TireFrontLeft
		{
			xywh = 1.4000 1.5857 0.7143 0.7143,
		}

		area TireFrontRight
		{
			xywh = -1.4000 1.5857 0.7143 0.7143,
		}

		area TireRearLeft
		{
			xywh = 1.4000 -1.5286 0.7143 0.7143,
		}

		area TireRearRight
		{
			xywh = -1.4000 -1.5286 0.7143 0.7143,
		}

		template = TrunkDoor,
		
		part TrunkDoor
		{
			anim Open
			{
				sound = VehicleTrunkOpenSportsCar,
			}

			anim Close
			{
				sound = VehicleTrunkCloseSportsCar,
			}

			anim Lock
			{
				sound = LockVehicleDoorSportsCar,
			}

			anim Unlock
			{
				sound = UnlockVehicleDoorSportsCar,
			}

			anim IsLocked
			{
				sound = VehicleDoorIsLockedSportsCar,
			}
		
			table uninstall
			{
				requireUninstalled = WindshieldRear,
			}
		}
		
		template = Trunk/part/TruckBed,

		part TruckBed
		{
			itemType = Base.BigTrunk,
		}

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

		part Seat*
		{
			table install
			{
				skills = Mechanics:2,
			}

			table uninstall
			{
				skills = Mechanics:2,
			}
		}

		template = GloveBox,
		template = GasTank,
		template = Battery,
		template = Engine,
		template = Muffler,
		
		part Muffler
		{
			model Default
			{
				file = fhqImprezaWagExh,
			}
		}
		
		template = EngineDoor,

		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,
		
		part Window*
		{
			anim Open
			{
				sound = VehicleWindowElectricOpen,
			}

			anim Close
			{
				sound = VehicleWindowElectricClose,
			}
		}
		
		template = Door/part/DoorFrontLeft,
		template = Door/part/DoorFrontRight,
		template = Door/part/DoorRearLeft,
		template = Door/part/DoorRearRight,
		template = Tire,

		part TireFrontLeft
		{
			model InflatedTirePlusWheel
			{
				file = fhqMZImprezaWheelLeft,
			}
		}

		part TireFrontRight
		{
			model InflatedTirePlusWheel
			{
				file = fhqMZImprezaWheelRight,
			}
		}

		part TireRearLeft
		{
			model InflatedTirePlusWheel
			{
				file = fhqMZImprezaWheelLeft,
			}
		}

		part TireRearRight
		{
			model InflatedTirePlusWheel
			{
				file = fhqMZImprezaWheelRight,
			}
		}

		template = Brake,
		template = Suspension,
		template = Radio,
		template = Headlight,

		attachment trailer
		{
			offset = 0.0000 -0.0286 -2.5857,
			rotate = 0.0000 0.0000 0.0000,
			zoffset = -1.0000,
		}

		attachment trailerfront
		{
			offset = 0.0000 -0.1143 2.7571,
			rotate = 0.0000 0.0000 0.0000,
			zoffset = 1.0000,
		}
	}
}
