;	---------------------------------------------------------------------
;	Make and model	:		Toyota Sprinter Trueno (AE86)
;	Driver		:		You
;	---------------------------------------------------------------------
;	Mesh		:		FSR, Endo & DiscoQuinn
;	Texturing	:		FSR
;	Wheels		:		Endo & FSR
;	Car.ini		:		Cosmo & FSR
;	Sounds		:		Outlaw
;	Shaders		:		LB
;	---------------------------------------------------------------------
;       Version		:		1.0 final
car
{
  	name=Toyota Sprinter Trueno
	year=1985
  	credits=
  	comments=Tuned version with rotary engine
	id=maeda
  	version=050f
  	wheels=4
  	cg
  	{
    		x=0
    		y=-0.240
    		z=0.156
  	}
  	shadow
  	{
    	 	texture=shadow.tga
     	 	length=4.2
     	 	width=1.9
      		offset_z=0
		intensity_dark=0.5
		intensity_light=0.5
  	}
	ff_factor=0.4
}

graphics
{
  	shadow
  	{
    		model
    		{
      			file=body.dof
			use_shaders=0
    		}
		intensity=0.2
  	}
}

body
{
	;850kg + 75kg driver - 150kg unsprung mass
  	mass=725
  	restitution_coeff=0.1
  	inertia
  	{
    		x=1600
    		y=2200
    		z=300
  	}
	x=0
	y=0
	z=0
	restitution_coeff=0.15
	length=0
	width=0
	height=0
	manual_box=0
  	model
  	{
		file=body.dof
	}
  	model_incar
  	{
    		file=
  	}
  	model_braking_l
  	{
    		file=brakelights.dof
  	}
	model_braking_r
	{
		;file=
	}
  	model_light_l
  	{
    		file=
  	}
	model_light_r
	{
		;file=
	}
}

steer
{
	x=0
	y=0
	z=0
	radius=0
	xa=0
  	lock=720
	;setup for 180° wheel, use 0.8 for 900° wheels
	linearity=0.16
  	model
  	{
    		file=
  	}
}

engine
{
  	mass=0
  	start_rpm=1000
  	idle_rpm=1000
  	stall_rpm=500
  	autoclutch_rpm=3000
  	max_rpm=8000
  	starter=1
  	starter_torque=80
  	start_stalled=0
  	curve_torque=torque.crv
  	max_torque=0.8
  	torque_reaction=0.05
  	shifting
  	{
    		automatic=0
    		shift_up_rpm=8500
    		shift_down_rpm=4500
    		time_to_declutch=200
		time_in_neutral=100
    		time_to_clutch=200
		time_to_declutch_down=200
		time_in_neutral_down=100
		time_to_clutch_down=200
  	}
  	inertia
  	{
    		engine=0.15
    		final_drive=0.1
  	}
  	braking_coeff=2.0
	sample=rx7-6000v4.wav
	sample_rpm=6500
}

gearbox
{
   	gears=6
   	gear0
   	{
      		ratio=-3.38
      		inertia=0.1
		engine_map=1.00
   	}
   	gear1
   	{
      		ratio=3.32
      		inertia=0.1
		engine_map=1.00
   	}
   	gear2
   	{
      		ratio=1.9
      		inertia=0.08
		engine_map=1.00
   	}
   	gear3
   	{
      		ratio=1.31
      		inertia=0.06
		engine_map=1.00
   	}
   	gear4
   	{
      		ratio=1.00
      		inertia=0.04
		engine_map=1.00
   	}
   	gear5
   	{
      		ratio=0.84
      		inertia=0.02
		engine_map=1.00
   	}
   	
}

clutch
{
   	max_torque=1000
}

handbrakes
{
   	wheels=23
}

differential
{
  	type=1
  	ratio=4.100
	inertia=0.1
	locking_coeff=250
	locking_coeffient=250
	output0=2
	output1=3
}

aero
{
  	body
  	{
    		center=0 0 0
    		cx=0.37
    		area=1.82
 	}
	wings=3
	wing0
	{
		name=Body Lift
	      	span=1.2
	      	cord=0.1
		angle=0
		angle_offset=1
		coeff_drag=0
		coeff_down=-4
		center=0.0 0.0 0.1
	}
	wing1
	{
		name=Front Spoiler
		span=1.4
		cord=0.4
		angle=1
		angle_offset=1
		coeff_drag=0.5
		coeff_down=10
		center=0 0.0 2.0
	}
	wing2
	{
		name=Rear Wing
	      	span=1.5
	      	cord=0.2
		angle=1
		angle_offset=1
		coeff_drag=2
		coeff_down=40
		center=0.0 0.0 -2.0
	}
}

antirollbar
{
   	count=2
   	arb0
   	{
      		susp_left=0
      		susp_right=1
      		k=40000
   	}
   	arb1
   	{
      		susp_left=2
      		susp_right=3
      		k=10000
   	}
}

susp_front
{
  	y=0.0
  	z=1.266
	restlen=0.430
  	minlen=0.365
  	maxlen=0.550
  	k=99000
  	bump_rate=3100
	bump_function=3
  	rebound_rate=6500
	rebound_function=0
	anti_pitch=0.5
	camber_change_per_m=0.317
	caster_offset=-0.03
  	roll_center
  	{
    		x=0
    		y=-0.555
    		z=0
  	}
}

susp0~susp_front
{
  	x=0.6925
	camber_change_steering=0.1
	toe_change_per_m=0.02
}

susp1~susp_front
{
  	x=-0.6925
	camber_change_steering=-0.1
	toe_change_per_m=-0.02
}

susp_rear
{
  	y=0.0
  	z=-1.134
  	restlen=0.445
  	minlen=0.340
  	maxlen=0.540
  	k=73500
  	bump_rate=1600
	bump_function=3
  	rebound_rate=4100
	rebound_function=0
	anti_pitch=0.4
	camber_change_per_m=0.0
  	roll_center
  	{
    		x=0
    		y=-0.405 ;-0.405
    		z=0
  	}
}

susp2~susp_rear
{
  	x=0.680 ; 0.675
}

susp3~susp_rear
{
  	x=-0.680 ; -0.675
}

tire_model
{
	damping_predict_lat=0
	damping_predict_long=0
}

pacejka
{
   	a1=-35
   	a4=10
   	a5=0.014
   	a6=-0.24
   	a7=1.0
   	a8=-0.03
   	a9=-0.0013
   	a10=-0.15
   	a111=-11
   	a112=-0.29
   	a12=17.8
   	a13=-2.4
   	b1=-70
   	b3=23.3
   	b4=400
   	b5=0.05
   	b6=0
   	b7=0.055
   	b8=-0.024
   	b9=0
   	b10=0
   	b11=0
   	b12=0
   	c0=2.2
   	c1=-3
   	c2=-3
   	c3=-1.26
   	c4=-4
   	c5=-0.025
   	c6=0
   	c7=0.044
   	c8=-0.58
   	c9=0.18
   	c10=0.043
   	c11=0.048
   	c12=-0.0035
   	c13=-0.18
   	c14=-0.04
   	c15=-1.029
   	c16=0.27
   	c17=-1.1
   	optimal_slipratio=0.1
   	optimal_slipangle=0.15
}

wheel_front
{
  	y=0
  	z=0
  	camber=-4
  	steering=1
  	powered=0
  	lock=70
	mass=30
  	inertia=1.1
  	radius=0.295
  	rolling_coeff=0.015
  	max_braking=1800
  	braking_factor=0.6
  	tire_rate=196000
  	pacejka~pacejka
  	{
		a0=1.30
		a2=1450
	   	a3=1900
   	   	b0=1.35
   		b2=1700
  	}
}

wheel_rear
{
  	y=0
  	z=0
  	camber=0.0
  	steering=0
  	powered=1
  	mass=45
  	inertia=1.1
  	radius=0.295
  	rolling_coeff=0.015
  	max_braking=1800
  	braking_factor=0.4
 	max_handbrake_torque=5000
  	tire_rate=196000
  	pacejka~pacejka
  	{
		a0=1.30
		a2=1450
	   	a3=1900
   	   	b0=1.35
   		b2=1700
  	}
}

wheel0~wheel_front
{
  	x=0
  	toe=-0.0
	ackerman=1.2
  	model
  	{
    		file=equip_left.dof
  	}
  	model_brake
  	{
    		file=caliper_lf.dof
  	}
}

wheel1~wheel_front
{
  	x=0
  	toe=0.0
	ackerman=-1.2
  	model
  	{
    		file=equip_right.dof
  	}
  	model_brake
  	{
    		file=caliper_rf.dof
  	}
}

wheel2~wheel_rear
{
  	x=0
  	toe=-0.0
  	model
  	{
    		file=equip_left.dof
		offset
		{
			x=0.020
		}

  	}
  	model_brake
  	{
    		file=caliper_lr.dof
  	}
}

wheel3~wheel_rear
{
  	x=0
  	toe=0.0
  	model
  	{
    		file=equip_right.dof
		offset
		{
			x=-0.020
		}

  	}
  	model_brake
  	{
    		file=caliper_rr.dof
  	}
}

; AUDIO SETTINGS
; -------------------------------------------------------------

audio
{
	skid
	{
		sample=skid.wav
	}
	acc_all
	{
		attack=600
		decay=600
	}

;	------------------ OUT

	accelerate_out
	{
		smp0~audio.acc_all
		{
			sample=rx7-1000v1.wav
			min=1
			max=1000
			natural=1000
			volume=0.8
		}
		smp1~audio.acc_all
		{
			sample=rx7-6000v4.wav
			min=1000
			max=10000
			natural=6500
			volume=1
		}
		smp2~audio.acc_all
   		 {
			sample=turbo.wav
      			min=2500
			max=8000
			attack=1500
			decay=1000
			natural=2500
			volume=0.6
   		 }
		smp3~audio.acc_all
   		{
      			sample=backfire.wav
			min=8100
			max=8500
			natural=22000
			volume=2
   		}	
	}

	decelerate_out
	{
		smp0~audio.acc_all
		{
			sample=rx7-1000v1.wav
			min=1
			max=1000
			natural=1000
			volume=0.8
		}
		smp1~audio.acc_all
		{
			sample=rx7-6000dev41.wav
			min=1000
			max=10000
			natural=6500
			volume=1
		}
		; smp2~audio.acc_all
		; {
		; 	sample=wastegate.wav
		; 	min=5000
		; 	max=9000
		; 	natural=30000
		; 	volume=4
		; }
	}

;	------------------ IN

	accelerate_in
	{
		smp0~audio.acc_all
		{
			sample=rx7-1000v1.wav
			min=1
			max=1000
			natural=1000
			volume=0.8
		}
		smp1~audio.acc_all
		{
			sample=rx7-6000v4.wav
			min=1000
			max=10000
			natural=6500
			volume=1
		}
		smp2~audio.acc_all
   		 {
      			sample=turbo.wav
			min=2500
			max=8000
			attack=1500
			decay=1000
			natural=2500
			volume=0.6
   		 }
		smp3~audio.acc_all
   		{
      			sample=backfire.wav
			min=8100
			max=8500
			natural=22000
			volume=2
   		}
	}


	decelerate_in
	{
		smp0~audio.acc_all
		{
			sample=rx7-1000v1.wav
			min=1
			max=1000
			natural=1000
			volume=0.8
		}
		smp1~audio.acc_all
		{
			sample=rx7-6000dev41.wav
			min=1000
			max=10000
			natural=6500
			volume=1
		}
		; smp2~audio.acc_all
		; {
		; 	sample=wastegate.wav
		; 	min=5000
		; 	max=9000
		; 	natural=30000
		; 	volume=4
		; }
	}

	wind
	{
		volume=2
		pitch_scale=0
		pitch_offset=50
		smp0
		{
			sample=wind1.wav
			min=25
			max=26
			attack=33
			decay=33
			natural=80
		}
		smp1
		{
			sample=wind2.wav
			min=50
			max=51
			attack=33
			decay=33
			natural=80
		}
		smp2
		{
			sample=wind3.wav
			min=75
			max=76
			attack=33
			decay=33
			natural=80
		}
	}
}

; CAMERA SETTINGS
; -------------------------------------------------------------

camera0
{
	name=ChaseNormal
	fov=60
	model=0
	wheels=0
	view=0
	offset
	{
		x=0
		y=2
		z=-7
	}
	follow
	{
		pitch=0
		yaw=0
		roll=0
	}
	src
	{
		mass=6
		k=600
		damping=200
		maxdist=2
	}
	angle
	{
		x=10
		y=180
		z=0
	} 
}

camera1
{
	name=ChaseClose
	fov=60
	model=0
	wheels=0
	view=0
	offset
	{
		x=0
		y=1.5
		z=-5
	}
	follow
	{
		pitch=0
		yaw=0
		roll=0
	}
	src
	{
		mass=6
		k=600
		damping=120
		maxdist=2
	}
	angle
	{
		x=5
		y=180
		z=0
	} 
}

camera2
{	
	name=Hood
	fov=60
	model=0
	wheels=2
	view=0
	offset
	{
		x=-0.0
		y=0.45
		z=0.8
	}
	angle
	{
		x=0
		y=180
		z=0
	}
	follow
	{
		pitch=1
		yaw=1
		roll=1
	}
	offset_to
	{
		x=0
		y=0
		z=5
	}
	src
	{
		mass=2
		k=3000
		damping=500
		maxdist=0.01
	}
	dst
	{
		mass=0
		k=0
		damping=0
		maxdist=0
	}
}

camera3
{
	name=Behind
	fov=60
	model=0
	wheels=0
	view=0
	offset
	{
		x=0
		y=-1.3
		z=-1
	}
	follow
	{
		pitch=1
		yaw=1
		roll=1
	}
	angle
	{
		x=3
		y=0
		z=0
	}

}

camera4
{
	name=FrontBumper
	model=2
	wheels=2
	view=2
	fov=75
	offset
	{
		x=0
		y=-0.0
		z=2.3
	}
	follow
	{
		pitch=1
		yaw=1
		roll=1
	}
	angle
	{
		x=2
		y=180
		z=0
	}
}

camera5
{
	name=RearBumper
	model=2
	wheels=2
	view=2
	fov=75
	offset
	{
		x=0
		y=-0.0
		z=2.3
	}
	follow
	{
		pitch=1
		yaw=1
		roll=1
	}
	angle
	{
		x=2
		y=0
		z=0
	}
}

camera6
{
	name=Roof
	fov=80
	model=0
	wheels=0
	view=0
	offset
	{
		x=0
		y=-1.2
		z=-0.6
	}
	angle
	{
		x=10
		y=180
		z=0
	}
	follow
	{
		pitch=1
		yaw=1
		roll=1
	}
}

camera7
{
	name=Side
	fov=80
	model=0
	wheels=0
	view=0
	offset
	{
		x=-1.2
		y=0
		z=0.5
	}
	angle
	{
		x=0
		y=170
		z=0
	}
	follow
	{
		pitch=1
		yaw=1
		roll=1
	}
}

camera8
{
	name=Wing
	fov=70
	model=0
	wheels=0
	view=0
	offset
	{
		x=-1.1
		y=-0.7
		z=-2.0
	}
	angle
	{
		x=0
		y=170
		z=0
	}
	follow
	{
		pitch=1
		yaw=1
		roll=1
	}
}

camera9
{
	name=Fender
	fov=70
	model=0
	wheels=0
	view=0
	offset
	{
		x=-1.15
		y=-0.5
		z=-1.6
	}
	angle
	{
		x=0
		y=-5
		z=0
	}
	follow
	{
		pitch=1
		yaw=1
		roll=1
	}
}