car
{
   name=BMW X6
  year=2010
  credits=Converted by Seby and Radu
  comments=
   wheels=4
  id=bmwx6
  version=050final
  skid
  {
    sample=skid.wav
  }
  shadow
  {
    texture=shadow.tga
    width=2.4
    length=5.06
    offset_z=-0.06
  }
 cg
 {
  x=0
  y=-0.15
  z=0.0
 }
  ff_factor=0.45
}
body
{
  mass=2200
  inertia
  {
    x=2300
    y=2400
    z=475
  }
  model
  {
    file=x6.dof
  }
  model_incar
  {
    file=x6.dof
  }
  model_light_l
  {
  file=lights.dof
  }
	model_braking_l
	{
		file=brakes.dof
	}
 model_lightroad_l
 {
  file=lightsin.dof
 }
  model_reverse_l
  {
    ; Reverse gear indicators
    file=re.dof
  }
  model_reverse_r
  {
    file=re.dof
}
  width=1.96
  height=0.75
  length=4.46
  manual_box=1
}
steer
{
  x=0.37
  y=0.23
  z=0.48
  radius=10
  xa=15
  lock=900
  linearity=0.3	;0.325	;3 turns lock to lock = 1080 degrees 15.4:1 steering ratio
  model
  {
      file=steer.dof
  }
}
lights
{
  ; Projected lights
  light0
  {
    texture=light.tga
    ; Field of view (vertical)
    fov=35
    ; Aspect (horizontal)
    aspect=4.5
    ; Distance to car
    z=0.2
    ; Pitching with respect to car (in degrees)
    pitch=0
    ; Fall-off distance
    far=100
  }
  light1
  {
    texture=light0.tga
    ; Field of view (vertical)
    fov=25.0
    ; Aspect (horizontal)
    aspect=1
    ; Distance to car
    z=2
    ; Pitching with respect to car (in degrees)
    pitch=10
  }
}
flares
{
  ; Front lights
  flare0
  {
    pos=-0.64 0.01 1.83
    color=1.0 0.8 1.6
	normal=0.05 0 1
	z_offset=-2500
	size_factor=0.7
	intensity=0.7
        hor_scale=0.7
  }
  flare1
  {
    pos=0.64 0.01 1.83
    color=1.0 0.8 1.6
	normal=0.05 0 1
	z_offset=-2500
	size_factor=0.7
	intensity=0.7
        hor_scale=0.7
  }
  flare2
  {
    pos=-0.64 0.01 1.83
    color=1.0 0.8 1.6
	normal=0.05 0 1
	z_offset=-2500
	size_factor=0.7
	intensity=0.7
        hor_scale=0.7
  }
  flare3
  {
    pos=0.64 0.01 1.83
    color=1.0 0.8 1.6
	normal=0.05 0 1
	z_offset=-2500
	size_factor=0.7
	intensity=0.7
        hor_scale=0.7
  }
  flare4
  {
    pos=-0.69 -0.3 1.97
    color=1.0 0.7 0.55
	normal=0.05 0 1
	z_offset=-2500
	size_factor=0.85
	intensity=0.9
        hor_scale=1.6
  }
  flare5
  {
    pos=0.69 -0.3 1.97
    color=1.0 0.7 0.55
	normal=0.05 0 1
	z_offset=-2500
	size_factor=0.85
	intensity=0.9
        hor_scale=1.6
  }
  flare6
  {
    pos=-0.69 -0.3 1.97
    color=1.0 0.7 0.55
	normal=0.05 0 1
	z_offset=-2500
	size_factor=0.85
	intensity=0.9
        hor_scale=1.6
  }
  flare7
  {
    pos=0.69 -0.3 1.97
    color=1.0 0.7 0.55
	normal=0.05 0 1
	z_offset=-2500
	size_factor=0.85
	intensity=0.9
        hor_scale=1.6
  }
  ; Rear lights
  flare8
  {
    pos=0.48 0.14 -2.26
	normal=-0.05 0 -0.5
	color=1.0 0.3 0.0
	size_factor=0.7
	intensity=0.7
	z_offset=-1000
  }
  flare9
  {    
    pos=0.48 0.14 -2.26
	normal=-0.05 0 -0.5
	color=1.0 0.3 0.0
	size_factor=0.7
	intensity=0.7
	z_offset=-1000
  }
  ; Brake lights
  flare10
  {
    rule=brake
    pos=-0.63 0.16 -2.23
	normal=0 0 -1
	color=1.0 0.0 0.0
	size_factor=0.7
	intensity=0.5
	z_offset=-1000
  }
  flare11
  {
    rule=brake
    pos=0.63 0.16 -2.23
	normal=0 0 -1
	color=1.0 0.0 0.0
	size_factor=0.7
	intensity=0.5
	z_offset=-1000
  }
  flare12
  {
    rule=brake
    pos=-0.63 0.16 -2.23
	normal=0 0 -1
	color=1.0 0.0 0.0
	size_factor=0.7
	intensity=0.5
	z_offset=-1000
  }
  flare13
  {
    rule=brake
    pos=0.63 0.16 -2.23
	normal=0 0 -1
	color=1.0 0.0 0.0
	size_factor=0.7
	intensity=0.5
	z_offset=-1000
  }
  ;3rd Brake lights
  flare14
  {
    rule=brake
    pos=0 0.68 -1.34
	normal=0 0 -1
	color=1.0 0.0 0.0
	size_factor=0.6
	intensity=0.3
	z_offset=-1000
        hor_scale=3
  }
  flare15
  {
    rule=brake
    pos=0 0.68 -1.34
	normal=0 0 -1
	color=1.0 0.0 0.0
	size_factor=0.6
	intensity=0.3
	z_offset=-1000
        hor_scale=3
  }
}
engine
{
	size=0
  	mass=160
  	stall_rpm=350
  	start_rpm=950
  	idle_rpm=900
  	autoclutch_rpm=1500
  	max_rpm=6900

  	curve_torque=torque.crv
        ;8% loss
  	max_torque=320
  	idle_method=1
  	starter=1
  	starter_torque=200
  	start_stalled=1
    enable_stall=1

  jitter
  {
    amplitude=0.4
    time_min=350
    time_var=10
    frequency_min=5
    frequency_var=1
  }
  shifting
  {
    automatic=1
    shift_up_rpm=6800
    shift_down_rpm=2800
    time_to_declutch=70
    time_in_neutral=95
    time_to_clutch=20
    time_to_declutch_down=50
    time_in_neutral_down=250
    time_to_clutch_down=200
  }

 inertia
  {
    engine=0.25
    final_drive=0.1
  }
  braking_coeff=2.5
}
gearbox
{
   gears=7
   gear0
   {
      ratio=-3.938
      inertia=0.1
   }
   gear1
   {
      ratio=4.323
      inertia=0.01
   }
   gear2
   {
      ratio=2.456
      inertia=0.02
   }
   gear3
   {
      ratio=1.659
      inertia=0.03
   }
   gear4
   {
      ratio=1.4
      inertia=0.04
   }
   gear5
   {
      ratio=1.2
      inertia=0.05
   }
   gear6
   {
      ratio=1
      inertia=0.04
   }
}
clutch
{
   max_torque=700
}
handbrakes
{
   wheels=23
}
differential
{
	type=1
	ratio=3.46
	inertia=0.05
	locking_coeff=50
	output2=2
	output3=3
}
aero
{
  body
  {
    center=0 0 0
    cx=0.26
    area=2.0		
  }
  wings=1
  wing0
  {
    name=Overall aerodynamic effect R
    span=1
    cord=0.1
    coeff_drag=0
    coeff_down=8.5
    center=0 0.03 -1.38
    angle=0
    angle_offset=1
  }
}
antirollbar
{
  count=2
  arb0
  {
    susp_left=1
    susp_right=0
    k=36600
  }
  arb1
  {
    susp_left=3
    susp_right=2
    k=21800
  }
}
susp_front                    
{
  y=-0.28
  z=1.6
  restlen=0.332		;245mm,288.2kg/2826N, 12.5cm ground clearance
  minlen=0.17
  maxlen=0.34
  k=45946		;k=m(nf/0.159)sq NF ~ 1.7 ~ 36936N/m
  bump_rate=1300	;1283*1.0
  rebound_rate=4950	;6163*0.8
  bump_function=0
  bump_max=1300
  rebound_function=0
  anti_pitch=0.09
  camber_change_per_m=0
  roll_center
  {
    x=0
    y=-0.58	;-1.5cm
    z=0
  }
}
susp_rear
{
  y=-0.28
  z=-1.35
  restlen=0.331		;255mm, 366.8kg/3597N
  minlen=0.125
  maxlen=0.34
  k=47009		;k=m(nf/0.159)sq NF ~ 1.8 ~ 58036N/m
  bump_rate=1800	;1814*1.0
  rebound_rate=6650	;8305*0.8
  bump_function=0
  bump_max=1800
  rebound_function=0
  anti_pitch=0.14
  camber_change_per_m=0.45	;2.3 degree per 0.1m deflection!
  roll_center
  {
    x=0
    y=-0.531		;6.5cm
    z=0
  }
}
susp0~susp_front
  {
    x=0.85
    toe_change_per_m=0.029		;-0.23 static toe. 0.13 degrees change with 0.078m travel. Bump out to ~0.1 toe.!
    camber_change_steering=0.1062	;using caster angle 5.78 degrees @ max_lock, outside wheel camber wrt y axis = 3.54 degrees!
    caster_offset=-0.017		;5.78 degrees static caster -0.017!
    
  }
susp1~susp_front
  {
    x=-0.85
    toe_change_per_m=-0.029		;-0.23 static toe. 0.13 degrees change with 0.078m travel. Bump out to ~0.1 toe.!
    camber_change_steering=-0.1062	;using caster angle 5.78 degrees @ max_lock, outside wheel camber wrt y axis = 3.54 degrees!
    caster_offset=-0.017		;5.78 degrees static caster -0.017!
  }
susp2~susp_rear
  {
    x=0.9
    toe_change_per_m=0.019		;-0.27 static toe. 0.1 degrees change with 0.09m travel. Bump out to ~0.2 toe.!
  }
susp3~susp_rear
  {
    x=-0.9
    toe_change_per_m=-0.019		;-0.27 static toe. 0.1 degrees change with 0.09m travel. Bump out to ~0.2 toe.!
  }
tire_model_front
{
  damping_predict_lat=0
  damping_predict_long=0
}
tire_model_rear
{
  damping_predict_lat=0
  damping_predict_long=0
}
pacejka
{
    a0=1.2
    a1=-25
    a2=1200
    a3=2000
    a4=9
    a5=0.015
    a6=-0.25
    a7=0
    a8=-0.03
    a9=-0.001
    a10=-0.15
    a111=-8.5
    a112=-0.29
    a12=17.8
    a13=-2.4
    b0=1.3
    b1=-40
    b2=1250
    b3=20
    b4=325
    b5=0.08
    b6=0
    b7=0.05
    b8=-0.025
    b9=0.015
    b10=0.4
    b11=-50
    b12=0
    c0=2.2
    c1=-4
    c2=-3
    c3=-1
    c4=-7
    c5=0.0
    c6=0.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

    optimal_slipratio=0.12
    optimal_slipangle=0.173
}
wheel_front
{
	x=0
	y=0
	z=0
	steering=1
	powered=1
	power_gearing=1.65	;4.95*40/60/2 =1.65
	camber=-0.65
	lock=61
	mass=55
	inertia=1.1
	radius=.382
	rolling_coeff=0.0175
	max_braking=2000
	braking_factor=1
	max_handbrake_torque=100
	tire_rate=275000
	pacejka~pacejka
	{
	}
}
wheel_rear
{
	x=0
	y=0
	z=0
	steering=0
	powered=1
	camber=-0.55
	mass=65
	inertia=1.2
	radius=.395
	rolling_coeff=0.0175
	max_braking=2000
	braking_factor=0.50
	max_handbrake_torque=1900
	tire_rate=295000
	pacejka~pacejka
	{
        a2=1480
        a3=2150
        b2=1630
	}
}
wheel0~wheel_front
{
	toe=-.15
	ackerman=1.2
	model
	{
		file=lf.dof
	}
}
wheel1~wheel_front
{
	toe=.15
	ackerman=-1.2
	model
	{
		file=rf.dof
	}
}
wheel2~wheel_rear
{
	toe=-.0
	model
	{
		file=lf.dof
	}
}
wheel3~wheel_rear
{
	toe=.0
	model
	{
		file=rf.dof
	}
}
camera0
{
  name=Driver
  fov=65
  model=1
  view=0
  wheels=0
  offset
  {
    x=0.35
    y=0.53
    z=-0.15
  }
  offset_to
  {
    x=0.38
    y=-0.2
    z=10
  }
  src
  {
    mass=1
    k=250
    damping=25
    maxdist=0
  }
  dst
  {
    mass=1
    k=0
    damping=0
    maxdist=0
  }
}
camera1
{
  name=Driver, left
  fov=65
  model=1
  wheels=0
  view=1
   offset
  {
    x=0.35
    y=0.56
    z=-0.24
  }
  offset_to
  {
    x=10
    y=0.5
    z=10
  }
  src
  {
    mass=1
    k=250
    damping=25
    maxdist=0
  }
  dst
  {
    mass=1
    k=0
    damping=0
    maxdist=0
  }
}
camera2
{
  name=Driver, right
  fov=55
  model=1
  wheels=0
  view=1
  offset
  {
    x=0.35
    y=0.56
    z=-0.37
  }
  offset_to
  {
    x=-10
    y=0.5
    z=10
  }
  src
  {
    mass=1
    k=250
    damping=25
    maxdist=0
  }
  dst
  {
    mass=1
    k=0
    damping=0
    maxdist=0
  }
}
camera3
{
  name=Driver, rear
  fov=-65
  model=1
  wheels=0
  view=0
  offset
  {
    x=0.1
    y=0.53
    z=-0.43
  }
  offset_to
  {
    x=-1
    y=0.5
    z=-10
  }
  src
  {
    mass=1
    k=250
    damping=25
    maxdist=0.1
  }
  dst
  {
    mass=1
    k=0
    damping=0
    maxdist=0
  }
}
camera4
{
  name=Chase
  fov=60
  model=0
  view=0
  wheels=0
  follow
  {
    pitch=0
    yaw=1
    roll=0
  }
  offset
  {
    x=0
    y=-0.8
    z=-6
  }
  angle
  {
    x=10
    y=180
    z=0
  }
}
camera5
{
  name=Exterior
  fov=60
  model=0
  view=0
  wheels=0
  follow
  {
    pitch=0
    yaw=0
    roll=0
  }
  offset
  {
    x=0
    y=-0.5
    z=-5
  }
  angle
  {
    x=10
    y=130
    z=0
  }
}
camera6
{
  name=Rear chase
  fov=60
  model=0
  view=0
  wheels=0
  follow
  {
    pitch=0
    yaw=1
    roll=0
  }
  offset
  {
    x=0
    y=-0.8
    z=-6
  }
  angle
  {
    x=10
    y=0
    z=0
  }
}
camera7
{
  name=FrontWheel
  fov=60
  model=0
  view=0
  wheels=0
  follow
  {
    pitch=1
    yaw=1
    roll=1
  }
  offset
  {
    x=1.4
    y=0.06
    z=-0.5
  }
  angle
  {
    x=-2.25
    y=-161
    z=3.3
  }
}
camera8
{
  name=Far
  fov=20
  model=0
  view=0
  wheels=0
  follow
  {
    pitch=0
    yaw=0
    roll=0
  }
  offset
  {
    x=0
    y=-0.5
    z=-20
  }
  angle
  {
    x=10
    y=50
    z=0
  }
}
camera9
{
  name=Hood
  fov=60
  model=0
  wheels=0
  view=0
  follow
  {
    pitch=1
    yaw=1
    roll=1
  }
  offset
  {
    x=0
    y=-1.0
    z=0.8
  }
  angle
  {
    x=5
    y=180
    z=0
  }
}

;	------------------ 5.1 ALPHA AUDIO COMPATABILTY -----------------
audio
{
  skid
  {
    sample=skid.wav
  }
  acc_all
  {
    attack=1000
    decay=1000
  }
  accelerate_out
  {
    volume=1.25
    smp0~audio.acc_all
    {
      sample=idle.wav
      min=0
      max=1250
      attack=1000
      decay=1000
      natural=1300
    }
    smp1~audio.acc_all
    {
      sample=7000.wav
      min=1500
      max=8001
      natural=5500
     }
  }
  accelerate_in
  {
    volume=0.85
    smp0~audio.acc_all
    {
      sample=idle.wav
      min=0
      max=1250
      attack=1000
      decay=1000
      natural=1300
    }
    smp1~audio.acc_all
    {
      sample=7000.wav
      min=1500
      max=8001
      natural=5500
    }
  }
  decelerate_in
  {
    volume=0.8
    smp0~audio.acc_all
    {
      sample=idle.wav
      min=0
      max=1250
      attack=1000
      decay=1000
      natural=1300
    }
    smp1~audio.acc_all
    {
      sample=7000.wav
      min=1500
      max=8001
      natural=5500
    }
  }
   wind
   {
      smp0
      {
         volume=0.5
         sample=wind1.wav
         pitch_scale=2
         pitch_offset=2
         ; Speeds in m/s
         min=.5
         max=9999
         natural=20
      }
      smp1
      {
         volume=.2
         sample=driveshaft.wav
         pitch_scale=.5
         pitch_offset=.7
         ; Speeds in m/s
         min=.5
         max=9999
         natural=22
      }
   }
}


abs
{
  enable=1
  max_velocity_ratio=1.09 
  min_velocity_ratio=1.08
  min_velocity=1
}
traction_control
{
  	enable=1
  	min_velocity=3
  	max_velocity_ratio=1.050
  	min_velocity_ratio=1.300

}