car
{
	name=TCI - BMW M3 v1.0
	year=1987
	credits=FSR, Jole, TtR, Cosmo, Mr. Whippy, BLo0m 
  	comments=Touring Car Icons for Racer
  	id=m3e30race
  	version=090
	wheels=4
  	shadow
  	{
    		texture=shadow.tga
    		width=2.27
    		length=4.8
    		offset_z=-0.08
		intensity_dark=0.75
		intensity_light=0.25
  	}
  	cg
  	{
    		x=0
    		y=0
    		z=0
  	}
  	ff_factor=0.8
}

abs
{
	enable=0
	; operates at speeds above 5~10km/h, depending on road conditions
	min_velocity=1.389
	max_velocity_ratio=1.150
	min_velocity_ratio=1.149
	braking_factor=1.0
}

traction_control
{
	enable=0
	min_velocity=1.389
	max_velocity_ratio=1.090
	min_velocity_ratio=1.089
}

ai
{
	grip_factor=1.0
	understeer_correct=10
	oversteer_correct=10
}

body
{
  	mass=960
  	inertia
	{
		x=1850
		y=1950
		z=430
	}
  	model
  	{
		file=body_race.dof
  	}
 
  	model_braking_l
  	{
    		file=brakelights.dof
  	}
  	width=1.680
  	height=1.200
  	length=4.345
  	manual_box=1
}

steer
{
	x=0
	y=0
	z=0
	radius=0
	xa=0
	lock=720
	linearity=0.7
}

engine
{
  	mass=0
  	idle_rpm=1200
  	max_rpm=8500
  	start_rpm=1050
  	stall_rpm=400
  	autoclutch_rpm=1500
  	starter=1
  	starter_torque=90
  	start_stalled=0
  	curve_torque=torque.crv
  	max_torque=1.11
  	torque_reaction=0.1
  	shifting
  	{
    		automatic=0
		fast=0
    		shift_up_rpm=7200
    		shift_down_rpm=3500
    		time_to_declutch=150
    		time_in_neutral=100
    		time_to_clutch=150
    		time_to_declutch_down=150
    		time_in_neutral_down=100
    		time_to_clutch_down=150
  	}
  	inertia
  	{
    		engine=0.2
  	}
  	braking_coeff=2
}

gearbox
{
	gears=6
	gear0
	{
		inertia=0.21
		ratio=-2.66
	}
	gear1
	{
		ratio=2.337
		inertia=0.13
	}
	gear2
	{
		ratio=1.681
		inertia=0.09
	}
	gear3
	{
		ratio=1.358
		inertia=0.07
	}
	gear4
	{
		ratio=1.150
		inertia=0.05
	}
	gear5
	{
		ratio=1.000
		inertia=0.03
	}
}

differentials
{
	count=1
	diff0
	{
		type=1
		ratio=4.5
		inertia=0.1
		locking_coeff=60
		output0=2
		output1=3
		friction=60
	}
}

clutch
{
	max_torque=720
}

handbrakes
{
	wheels=23
}

aero
{
  	body
  	{
    		center=0 0 0
    		cx=0.33
    		area=1.89
  	}
	wings=3
	wing0
	{
		name=Overall Lift
		span=1
		cord=1
		coeff_drag=0
		coeff_down=-5.3		;18kg lift @ 200 km/h
		center=0 0 0
		angle=0
		angle_offset=1
	}
	wing1
	{
		name=Front splitter
		span=1
		cord=1
		coeff_drag=0
		coeff_down=2
		center=0 0 2.2
		angle=0
		angle_offset=1
	}
	wing2
	{
		name=Rear wing
		span=1
		cord=1
		coeff_drag=0
		coeff_down=15
		center=0 0 -2.2
		angle=0
		angle_offset=1
	}
}

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

susp_front
{
  	y=0.000
  	z=1.224

  	restlen=0.068
  	minlen=-0.32
  	maxlen=0.088

  	k=60000

	bumpstop_len=0.08
	bumpstop_k=150000 

  	bump_rate=3500
  	bump_function=0
  	rebound_rate=8000
  	rebound_function=0

  	anti_pitch=0.2

  	camber_change_per_m=0.355
    	caster_offset=-0.05
  	roll_center
  	{
    		x=0
		;60mm?
    		y=-0.275
    		z=0
  	}
}

susp0~susp_front
{
    	x=0.7085
    	camber_change_steering=0.050
    	toe_change_per_m=0.131
    
}
susp1~susp_front
{
    	x=-0.7085
    	camber_change_steering=-0.050
    	toe_change_per_m=-0.131
}

susp_rear
{
  	y=0.000
  	z=-1.338
  	restlen=0.11
  	minlen=0.01
  	maxlen=0.13

  	k=40000

	bumpstop_len=0.05
	bumpstop_k=150000

 	bump_rate=3500
  	bump_function=0
  	rebound_rate=6000
  	rebound_function=0

  	anti_pitch=0.1

  	camber_change_per_m=0.306
  	roll_center
  	{
    		x=0
		;90mm?
    		y=-0.274
    		z=0
  	}
}

susp2~susp_rear
{
    	x=0.715
    	toe_change_per_m=-0.016
}

susp3~susp_rear
{
    	x=-0.715
    	toe_change_per_m=0.016
}

tire_model
{
  	damping_predict_lat=0
  	damping_predict_long=0
}

pacejka
{
	a0=1.3
	a1=-30
	a2=1600
	a3=1800
	a4=6.6
	a5=0.014
	a6=-0.24
	a7=0
	a8=-0.03
	a9=-0.0013
	a10=-0.15
	a111=-2
	a112=-0.29
	a12=17.8
	a13=-2.4
	b0=1.2
	b1=-30
	b2=1500
	b3=10
	b4=400
	b5=0.05
	b6=0
	b7=0.055
	b8=-0.024
	b9=0.014
	b10=0.26
	b11=-50
	b12=0
	c0=2.48
	c1=-3
	c2=-2.7
	c3=-0.5
	c4=-5.2
	c5=0
	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.14
	c15=-1.029
	c16=0.27
	c17=-1.1
	; 3888N
	optimal_slipratio=0.12414
	optimal_slipangle=0.13000
}

skidding_default
{
	long_start=0
	long_max=0
	long_start_n=0
	long_max_n=0
	lat_start=0
	lat_max=0
}

wheel_front
{
	y=0
	z=0
	powered=0
  	steering=1
	reverse_steering=0
	lock=32
	ackerman=1.16
	camber=-2.4
	mass=30
	inertia=0.75
	radius=0.302
	rolling_coeff=0.011
	friction_road=1
	max_braking=2300
	braking_factor=0.7
	inboard_brakes=0
	tire_rate=230000
	pacejka~pacejka
	{
	}
}

wheel0~wheel_front
{
	x=0
	toe=0.2

  	model
  	{
    		file=left.dof
  	}
}

wheel1~wheel_front
{
  	x=0
  	toe=-0.2

  	model
  	{
    		file=right.dof
  	}
}

wheel_rear
{
	y=0
	z=0
	powered=1
	steering=0
	reverse_steering=0
	lock=0
	camber=-2.2
	mass=30
  	inertia=0.7
  	radius=0.302
  	rolling_coeff=0.011
  	friction_road=1
  	max_braking=2300
  	max_handbrake_torque=5000
  	braking_factor=0.3
	inboard_brakes=0
  	tire_rate=230000
  	pacejka~pacejka
	{
		a2=1620	
		a4=7.5
		b0=1.4
		c0=2.65
		c1=-4
		c2=-4
		; 2079N
		optimal_slipratio=0.12414
		optimal_slipangle=0.13963
	}
}

wheel2~wheel_rear
{
  	x=0
  	toe=-0.2

  	model
  	{
    		file=left.dof
  	}
}

wheel3~wheel_rear
{
  	x=0
  	toe=0.2

  	model
  	{
    		file=right.dof
  	}
}

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

camera0
{
	name=Hood
	fov=60
	model=0
	wheels=2
	view=0
	offset
	{
		x=-0.0
		y=0.70
		z=0.84
	}
	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
	}
}

camera1
{
	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
	}
}

camera2
{
	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
	}
}

camera3
{
	name=Inside Driver
	fov=60
	model=1
	wheels=0
	view=0
	follow
	{
		pitch=1
		yaw=1
		roll=1
	}
	offset
	{
		x=0.4
		y=-0.32
		z=-0.07
	}
	angle
	{
		x=4
		y=180.0
		z=0
	}
}

camera4
{
	name=FrontBumper
	model=2
	wheels=2
	view=1
	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=Photo
	fov=35
	model=0
	wheels=0
	view=0
	offset
	{
		x=-0
		y=-0
		z=-0
	}
	angle
	{
		x=0
		y=0
		z=0
	}
	follow
	{
		pitch=1
		yaw=1
		roll=1
	}
}

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

audio
{
	skid
	{
    		sample=skid.wav
		sample2=scrub.wav
	}
	acc_all
	{
		attack=1400
		decay=1400
	}
	accelerate_out
  	{
    		smp0~audio.acc_all
    		{
      			volume=0.4
			sample=idle.wav
      			min=1
      			max=2000
      			natural=5500
    		}
		smp1~audio.acc_all
    		{
      			volume=0.8
     			sample=onlow.wav
      			min=3000
      			max=4000
      			natural=5500
    		}
		smp2~audio.acc_all
    		{
      			volume=1.2
			sample=onmid.wav
	      		min=5000
      			max=6000
      			natural=5500
    		}
		smp3~audio.acc_all
    		{
			volume=1.6
	     		sample=onhigh.wav
      			min=7000
      			max=10000
      			natural=5500
    		}
  	}
  	decelerate_out
  	{
   		smp0~audio.acc_all
    		{
      			volume=0.4
			sample=idle.wav
	      		min=1
      			max=2000
      			natural=5500
    		}
		smp1~audio.acc_all
    		{
			volume=0.4
      			sample=offlow.wav
			min=3000
			max=4000
      			natural=5500
    		}
		smp2~audio.acc_all
    		{
			volume=0.4     		
			sample=offmid.wav
      			min=5000
      			max=6000
      			natural=5500
    		}
		smp3~audio.acc_all
    		{
			volume=0.4		
			sample=offhigh.wav
			min=7000
      			max=10000
      			natural=5500
    		}
	}
	wind
	{
		volume=0.4
		pitch_scale=0
		pitch_offset=50
		smp0
		{
			sample=wind.wav
			min=0
			max=300
			attack=0
			decay=0
			natural=80
		}
		smp1
		{
			sample=road.wav
			min=0
			max=300
			attack=0
			decay=0
			natural=80
		}
	}
	gearwhine
  	{
		smp0
		{
			sample=whinelow.wav
			volume=0.4
			attack=70
			decay=70
			min=50
			max=200
			natural=400
		}
		smp1
		{
			sample=whinehigh.wav
			volume=0.6
			attack=70
			decay=0
			min=250
			max=50000
			natural=400
		}
	}
	shiftout
	{
		sample=shift.wav
	}
}