car
{
  name=Audi RS6 Avant
  year=2008
  credits=Model: DERK7, Racer conversion: johnthelemon, Engine sounds: Napier/ Mr. Quad
  comments=5.0L V10 2 Turbo, 650Nm@1500-6250Rpm, 572Bhp@6250-6700Rpm 
  wheels=4
  id=audi_rs6_avant
  version=090b
  
  shadow
  {
    texture=shadow.tga
    width=2.7
    length=5.5
    offset_z=0
  }

  cg
  {
   x=0
   y=0
   z=0
  }
  ff_factor=0.26
}

graphics
{
  shadow
  {
    model
    {
      file=shadow.dof
      use_shaders=1
    }
    intensity=0.3
  }
  generic
  {
   model0
   {
     file=seatbelts.dof
   }
   model1
   {
     file=signal_left.dof
   }
   model2
   {
     file=signal_right.dof
   }
   model3
   {
     file=signal_ml.dof
   }
   model4
   {
     file=signal_mr.dof
   }
   model5
   {
     file=flameout.dof
   }
   model6
   {
     file=driver_body.dof
     offset
     {
       x=0.405
       y=0.45
       z=-0.02
     }
   }
   model7
   {
     file=driver_head.dof
   }
   model8
   {
     file=passenger_body.dof
     offset
     {
       x=-0.405
       y=0.45
       z=-0.02
     }
   }
   model9
   {
     file=passenger_head.dof
   }
  }
}

lights
{
  ; Projected lights
  light0
  {
    texture=light0.tga
    ; Field of view (vertical)
    fov=25.0
    ; Aspect (horizontal)
    aspect=2.5
    ; Distance to car
    z=2
    ; Pitching with respect to car (in degrees)
    pitch=2.5
    ;Light color
    color=3 3.5 4
    ;Max distance
    far=100
  }
}

flares
{
  ; Low Beam
  flare0
  {
    pos=0.685 0.192 2.25
    color=0.8 0.9 1
    normal=0 0 1
    z_offset=-2500
    size_factor=1
    intensity=0.125
    hor_scale=1
  }
  flare1
  {
    pos=-0.685 0.192 2.25
    color=0.8 0.9 1
    normal=0 0 1
    z_offset=-2500
    size_factor=1
    intensity=0.125
    hor_scale=1
  }
  ; High Beam
  flare2
  {
    pos=0.572 0.192 2.28
    color=0.8 0.9 1
    normal=0 0 1
    z_offset=-2500
    size_factor=0.75
    intensity=0.15
    hor_scale=1
  }
  flare3
  {
    pos=-0.572 0.192 2.28
    color=0.8 0.9 1
    normal=0 0 1
    z_offset=-2500
    size_factor=0.75
    intensity=0.15
    hor_scale=1
  }
  ; Brake Lights - Outer
  flare4
  {
    pos=0.7 0.44 -2.28
    color=1 0.2 0
    normal=0 0 -1
    z_offset=-2500
    size_factor=0.5
    intensity=0.15
    hor_scale=2.5
    rule=brake
    billboard=1
  }
  flare5
  {
    pos=-0.7 0.44 -2.28
    color=1 0.2 0
    normal=0 0 -1
    z_offset=-2500
    size_factor=0.5
    intensity=0.15
    hor_scale=2.5
    rule=brake
    billboard=1
  }
  ; Brake Lights - Inner
  flare6
  {
    pos=0.55 0.44 -2.35
    color=1 0.2 0
    normal=0 0 -1
    z_offset=-2500
    size_factor=0.5
    intensity=0.15
    hor_scale=3
    rule=brake
    billboard=1
  }
  flare7
  {
    pos=-0.55 0.44 -2.35
    color=1 0.2 0
    normal=0 0 -1
    z_offset=-2500
    size_factor=0.5
    intensity=0.15
    hor_scale=3
    rule=brake
    billboard=1
  }
  ; 3rd Brake Lamp
  flare8
  {
    pos=0 0.91 -1.82
    color=1 0.2 0
    normal=0 0 -1
    z_offset=-2500
    size_factor=0.5
    intensity=0.15
    hor_scale=10
    rule=brake
    billboard=1
  }
}

wipers
{
  count=3
  wiper0
  {
    x=0.6
    y=0.46
    z=1.21
    xa=57
    min_angle=90
    max_angle=0
    model
    {
      file=wiper_left.dof
    }
  }
  wiper1
  {
    x=0.0
    y=0.47
    z=1.22
    xa=58
    min_angle=90
    max_angle=0
    model
    {
      file=wiper_right.dof
    }
  }
  wiper2
  {
    x=0
    y=0.58
    z=-2.3
    xa=-53
    min_angle=90
    max_angle=-90
    model
    {
      file=wiper_rear.dof
    }
  }
}

body
{
  mass=1850
  inertia
  {
    x=2850
    y=2450
    z=1200
  }
  width=2.28
  height=0.85
  length=5.2
  manual_box=0
  model
  {
    file=body.dof
  }
  model_incar
  {
    file=body.dof
  }
  model_braking_l
  {
   file=brake_lights.dof
  }
  model_light_l
  {
   file=ext_lights.dof
  }
  model_lightroad_l
  {
   file=int_lights.dof
  }
  model_reverse_l
  {
   file=reverse_lights.dof
  }
}

steer
{
  x=0.405
  y=0.36
  z=0.625
  radius=10
  xa=18
  lock=900
  linearity=0.325	
  model
  {
      file=steering.dof
  }
}

fuel
{
  type=0
  max=70
  bsfc=7e-5
}

engine
{
 	mass=200
 	max_rpm=8000
	idle_rpm=950
	curve_torque=torque.crv
	braking_coeff=1.82
	braking_offset=0
 	max_torque=0.7
 	autoclutch_rpm=0
 	starter=1
 	starter_torque=150
 	start_stalled=1
 	stall_rpm=650
 	start_rpm=1250
 	torque_reaction=0.25
	jitter
	{
		amplitude=0.5
		time_min=50
		time_var=700
		frequency_min=4
		frequency_var=4
	}
 	shifting
 	{
  		automatic=1
                fast=1
  		shift_up_rpm=6700
  		shift_down_rpm=3000
  		time_to_declutch=50
  		time_in_neutral=50
  		time_to_clutch=100
  		time_to_declutch_down=50
  		time_to_clutch_down=50
  		time_in_neutral_down=100
	        cut_throttle=5
 	}
 	inertia
 	{
  		engine=0.25
 	}

}

gearbox
{
  gears=7
  gear0
  {
    ratio=-3.403
    inertia=0.34
  }
  gear1
  {
    ratio=4.171
    inertia=0.42
  }
  gear2
  {
    ratio=2.340
    inertia=0.234
  }
  gear3
  {
    ratio=1.521
    inertia=0.152
  }
  gear4
  {
    ratio=1.143
    inertia=0.115
  }
  gear5
  {
    ratio=0.867
    inertia=0.087
  }
  gear6
  {
    ratio=0.691
    inertia=0.07
  }
}

clutch
{
  max_torque=750
}

differential
{
	type=1
	ratio=3.32
	inertia=0.33
	locking_coeff=100
	output0=2
	output1=3
}

handbrakes
{
   wheels=23
}

aero
{
 	body
 	{
  		center=0 0 0
  		cx=0.34
  		area=2.36
 	}
 	wings=1
 	wing0
 	{
  		name=Overall
  		span=2.5
  		cord=0.5
  		coeff_drag=0.2
  		coeff_down=0.5
  		center=0 0 0.5
  		angle=0
  		angle_offset=5
 	}
}

antirollbar
{
 	count=2
 	arb0
 	{
  		susp_left=0
  		susp_right=1
  		k=35000
 	}
 	arb1
 	{
  		susp_left=2
  		susp_right=3
  		k=22500
 	}
}

susp_front                    
{
  y=0.0
  z=1.57
  restlen=0.30
  minlen=0.15
  maxlen=0.38
  k=48000
  bump_rate=3850	
  rebound_rate=7950	
  bump_function=3
  bump_max=1460
  rebound_function=0
  anti_pitch=0.118
  roll_center
  {
    x=0
    y=-0.15
    z=0
  }
}
susp_rear
{
  y=0.0
  z=-1.37
  restlen=0.30
  minlen=0.12
  maxlen=0.45
  k=50000		
  bump_rate=1840	
  rebound_rate=6820	
  bump_function=3
  bump_max=1920
  rebound_function=0
  anti_pitch=0.078	
  roll_center
  {
    x=0
    y=-0.05
    z=0
  }
}

susp0~susp_front
  {
    x=0.825
    toe_change_per_m=0.029		
    camber_change_steering=0.1062	
    caster_offset=-0.017	
  }
susp1~susp_front
  {
    x=-0.825
    toe_change_per_m=-0.029  	
    camber_change_steering=-0.1062	
    caster_offset=-0.017		
  }
susp2~susp_rear
  {
    x=0.85
    toe_change_per_m=0.019	
  }
susp3~susp_rear
  {
    x=-0.85
    toe_change_per_m=-0.019	
  }

tire_model_front
{
  damping_predict_lat=0
  damping_predict_long=0
}
tire_model_rear
{
  damping_predict_lat=0
  damping_predict_long=0
}

pacejka
{
   ; Lateral force
   a0=1.246
   a1=-27
   a2=1450
   a3=1850
   a4=8.65 ;12
   a5=0.000 ;0.0
   a6=0 ;-0.04 ;0
   a7=0.7
   a8=0 ;0.003
   a9=0 ;-0.002
   a10=0 ;0.16
   a111=0
   a112=0 ;0.045
   a12=0 ;0.17
   a13=0 ;-23.5
   ; Longitudinal force
   b0=1.47
   b1=-15
   b2=1400
   b3=9.8
   b4=370
   b5=0
   b6=0
   b7=0
   b8=0
   b9=0
   b10=0
   b11=0
   b12=0
   ; Aligning moment
   c0=0.83
   c1=-2.2
   c2=9.39
   c3=0.219
   c4=-8.6
   c5=0.025
   c6=0.0
   c7=0.044
   c8=-0.58
   c9=0.18
   c10=0 ;0.043
   c11=0 ;0.048
   c12=0 ;-0.0035
   c13=0 ;-0.18
   c14=0 ;0.14
   c15=0 ;-1.029
   c16=0 ;0.27
   c17=0 ;-1.1
   optimal_slipratio=0.157
   optimal_slipangle=0.1507
}

skidding_default
{
  long_start=0.1
  long_max=1.0
  long_start_n=0.1
  long_max_n=1.0
  lat_start=0.1
  lat_max=1.0
}

wheel_all
{
  brake_heating=1e-5
  brake_dissipation=1e-6
  brake_max_temp=1000
}

wheel_front~wheel_all
{
  y=0
  z=0
  steering=1
  lock=48
  ackerman=1.18
  mass=24
  powered=1
  power_gearing=0.712
  inertia=1.25
  radius=0.34
  rolling_coeff=0.0158
  friction_road=1
  max_braking=7500
  braking_factor=.75
  tire_rate=300000
  camber=-0.5
  pacejka~pacejka
  {
  }
}
wheel_rear~wheel_all
{
  y=0
  z=0
  steering=0
  powered=1
  mass=24
  inertia=1.25
  radius=0.34
  rolling_coeff=0.0158
  max_braking=7500
  max_handbrake_torque=2500
  braking_factor=0.25
  tire_rate=300000
  camber=-0.5
  pacejka~pacejka
 {
  a0=1.4
  a1=-55
  a2=1900
  b0=1.5
  b1=-110
  b2=1850
  b4=320
  b5=0.1
  c1=-4.1
  c3=-1.36
  c4=-8.1
  optimal_slipratio=0.1
  optimal_slipangle=0.18
 }
}

wheel0~wheel_front
{
  x=0
  toe=-0.17
  model
  {
    file=wheel_left.dof
  }
  model_brake
  {
    file=caliper_left.dof
  }
}
wheel1~wheel_front
{
  x=0
  toe=0.17
  model
  {
    file=wheel_right.dof
  }
  model_brake
  {
    file=caliper_right.dof
  }
}
wheel2~wheel_rear
{
  x=0
  toe=-0.27
  model
  {
    file=wheel_left.dof
  }
  model_brake
  {
    file=caliper_left.dof
  }
}
wheel3~wheel_rear
{
  x=0
  toe=0.27
  model
  {
    file=wheel_right.dof
  }
  model_brake
  {
    file=caliper_right.dof
  }
}


;---------------------------------------------
;Cameras
;---------------------------------------------

camera0
{
	name=Chase Far
	model=0
	wheels=1
	view=0

	offset
	{
		x=0
		y=-1.5
		z=-7.5
	}
	angle
	{
		x=5
		y=180
		z=0
	}
 	follow
	{
		pitch=1
		yaw=1
		roll=1
	}
}

camera1
{
	name=Chase Close
	model=0
	wheels=1
	view=0

	offset
	{
		x=0
		y=-1
		z=-6
	}
	angle
	{
		x=5
		y=180
		z=0
	}
 	follow
	{
		pitch=1
		yaw=1
		roll=1
	}
}

camera2
{
	name=Front Bumper
	fov=75
	model=0
	wheels=1
	view=0

	offset
	{
		x=0
		y=0.15
		z=2.5
	}
	angle
	{
		x=0
		y=180
		z=0
	}
 	follow
	{
		pitch=1
		yaw=1
		roll=1
	}
}
camera3
{
	name=Bonnet
        fov=75
	model=0
	wheels=1
	view=0

	offset
	{
		x=0
		y=-1.1
		z=0.85
	}
	angle
	{
		x=15
		y=180
		z=0
	}
 	follow
	{
		pitch=1
		yaw=1
		roll=1
	}
}

camera4
{
	name=Free side view

	offset
	{
		x=0
		y=-0.5
		z=-7
	}
	angle
	{
		x=10
		y=127
		z=0
	}
}

camera5
{
	name=Front View
	model=0
	wheels=1
	view=0

	offset
	{
		x=0
		y=-1
		z=-6
	}
	angle
	{
		x=5
		y=0
		z=0
	}
 	follow
	{
		pitch=0
		yaw=1
		roll=0
	}
}

camera6
{
        name=Front Left Wheel
	model=0
	wheels=1
	view=0

	offset
	{
		x=1.75
		y=0
		z=-1.75
	}
	angle
	{
		x=25
		y=-120
		z=0
	}
 	follow
	{
		pitch=1
		yaw=1
		roll=1
	}
}

camera7
{
        name=Front Left Mirror
	model=0
	wheels=1
	view=0

	offset
	{
		x=.8
		y=-0.65
		z=-0.7
	}
	angle
	{
		x=5
		y=-155
		z=0
	}
 	follow
	{
		pitch=1
		yaw=1
		roll=1
	}
}

camera8
{
	name=Inside Passenger
	model=1
	wheels=0
	view=1

	offset
	{
		x=-0.405
		y=-0.7
		z=-0.05
	}
	angle
	{
		x=0
		y=180
		z=0
	}
 	follow
	{
		pitch=1
		yaw=1
		roll=1
	}
}

camera9
{
	name=Inside Driver
	model=1
	wheels=0
	view=1

	offset
	{
		x=0.405
		y=-0.7
		z=-0.05
	}
	angle
	{
		x=0
		y=180
		z=0
	}
 	follow
	{
		pitch=1
		yaw=1
		roll=1
	}
}

;Sounds------------------------------------------------------

audio
{
  skid
  {
    sample=skid.wav
  }
  horn
  {
    sample=horn.wav
  }
  shiftout
  {
    sample=shiftout.wav
  }
  shiftin
  {
    sample=shiftin.wav
  }
 accelerate_out
  {
 smp0
  {
  sample=sounds\idle_ex.wav
  min=155
  max=1250
  attack=500
  decay=500
  natural=900
  volume=4.5
  }
 smp1
  {
  sample=sounds\onlow_ex.wav
  min=1251
  max=3000
  attack=500
  decay=1500
  natural=5000
  volume=1.0
  }
 smp2
  {
  sample=sounds\onmid_ex.wav
  min=3000
  max=5000
  attack=1500
  decay=1500
  natural=5000
  volume=1.0
  }
 smp3
  {
  sample=sounds\onhigh_ex.wav
  min=5000
  max=8000
  attack=1500
  decay=1500
  natural=6000
  volume=1.0
  }
 smp4
  {
  volume=0.06
  sample=turbo.wav
  min=3000
  max=8000
  natural=1750
  attack=2300
  decay=3000
  }
  }
  decelerate_out
  {
 smp0
  {
  sample=sounds\idle_ex.wav
  min=155
  max=1250
  attack=500
  decay=500
  natural=900
  volume=4.5
  }
 smp1
  {
  sample=sounds\offlow_ex.wav
  min=1251
  max=3000
  attack=500
  decay=1500
  natural=5000
  volume=1.0
  }
 smp2
  {
  sample=sounds\offmid_ex.wav
  min=3000
  max=5000
  attack=1500
  decay=1500
  natural=5000
  volume=1.0
  }
 smp3
  {
  sample=sounds\offhigh_ex.wav
  min=5000
  max=8000
  attack=1500
  decay=1500
  natural=6000
  volume=1.0
  }
  }
 accelerate_in
  {
 smp0
  {
  sample=sounds\idle.wav
  min=155
  max=1250
  attack=500
  decay=500
  natural=900
  volume=3
  }
 smp1
  {
  sample=sounds\onlow.wav
  min=1251
  max=3000
  attack=500
  decay=1500
  natural=5000
  volume=0.7
  }
 smp2
  {
  sample=sounds\onmid.wav
  min=3000
  max=5000
  attack=1500
  decay=1500
  natural=5000
  volume=0.7
  }
 smp3
  {
  sample=sounds\onhigh.wav
  min=5000
  max=8000
  attack=1500
  decay=1500
  natural=6000
  volume=0.7
  }
 smp4
  {
  volume=0.06
  sample=turbo.wav
  min=3000
  max=8000
  natural=1750
  attack=2300
  decay=3000
  }
  }  
 decelerate_in
  {
 smp0
  {
  sample=sounds\idle.wav
  min=155
  max=1250
  attack=500
  decay=500
  natural=900
  volume=3
  }
 smp1
  {
  sample=sounds\offlow.wav
  min=1251
  max=3000
  attack=500
  decay=1500
  natural=5000
  volume=0.75
  }
 smp2
  {
  sample=sounds\offmid.wav
  min=3000
  max=5000
  attack=1500
  decay=1500
  natural=5000
  volume=0.75
  }
 smp3
  {
  sample=sounds\offhigh.wav
  min=5000
  max=8000
  attack=1500
  decay=1500
  natural=6000
  volume=0.75
  }
  }

 wind
  {
  volume=0.5
  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
  }
  }
 }

;TCL_ABS_Ai------------------------------------------------

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

abs
{
  	enable=1
  	max_velocity_ratio=1.10
  	min_velocity_ratio=1.05
        min_velocity=5
}

traction_control
{
 	enable=1
 	max_velocity_ratio=1.10
 	min_velocity_ratio=1.05
        min_velocity=5
}