car
{
  name=UAZ 3159 - Version 2
  year=
  credits=Converted by MBW13 - details and textures MBW13 - gauges by Silver Ranger (November 2005)
  comments=Permission granted for conversion
  wheels=8
  id=3159bars
  version=090
  ff_factor=1
  skid
  {
    sample=skid.wav
  }
  shadow
  {
    texture=
    width=0
    length=0
  }
  cg
  {
    x=0
    y=0.15	
    z=0.2	
  }
}
graphics
{
  ; Car models used
  shadow
  {
    model
    {
      ; Projected shadow model
      file=body.dof
      use_shaders=0
    }
    intensity=0.3
  }
  generic
  {
    model0
    {
      file=
  }
 }
}
lights
{
  ; Projected lights
  light0
  {
    texture=light.tga
    ; Field of view (vertical)
    fov=55
    ; Aspect (horizontal)
    aspect=5
    ; Distance to car
    z=2
    ; Pitching with respect to car (in degrees)
    pitch=0
    ; Fall-off distance
    far=100
    ; Color (multiplied with texture)
    color=40 40 40
  }
}
flares
{
  flare0
  {
      pos=-0.6 0.35 2.1
	normal=0 0.1 0.6
	z_offset=-3000
	color=0 0 0.01
	size_factor=6
  }
  flare1
  {
      pos=0.6 0.35 2.1
	normal=0 0.1 0.6
	z_offset=-3000
	color=0 0 0.01
	size_factor=6
  }
  flare2
  {
      rule=brake
      pos=0.75 0.25 -2.0
	normal=0.05 0 -0.5
	color=1 0 0
	size_factor=4
	z_offset=-1000
  }
  flare3
  {
      rule=brake
      pos=-0.75 0.25 -2.0
	normal=-0.05 0 -0.5
	color=1 0 0
	size_factor=4
	z_offset=-1000
  }
}
body
{
  mass=1590	
  inertia
  {
    x=1010
    y=1050
    z=250
  }
  ; Collision box
  width=0
  height=0.0
  length=0
  ; Define bounding box manually?
  manual_box=1
  ; Moving bounding box around
  box_offset=0 0 0
  model
  {
    file=body.dof
  }
  model_incar
  {
    file=body.dof
  }
 model_light_l
  {
    file=lights.dof
    offset
    {
      x=0
      y=0
      z=0
    }
  }
 model_light_r
  {
    file=
    offset
    {
      x=0
      y=0
      z=0
    }
  }
  model_braking_l
  {
    file=brakes.dof
  }
  width=1.6
  height=1.0
  length=3.3
  manual_box=0
}
steer
{
  x=0.415  ;location - left to right
  y=0.825 ;height
  z=0.525 ;front to back
  radius=2
  xa=35
  lock=730
  model
  {
    file=swheel.dof
  }
}
engine
{
  mass=0		
  max_torque=140
  curve_torque=torque.crv
  stall_rpm=420
  start_rpm=805
  idle_rpm=900
  autoclutch_rpm=1500
  max_rpm=4950
  starter=0
  starter_torque=30
  start_stalled=1
  enable_stall=1
  torque_reaction=0.1
  shifting
  {
    automatic=0
    shift_up_rpm=3800
    shift_down_rpm=2400
    time_to_declutch=30
    time_in_neutral=150
    time_to_clutch=150
    time_to_declutch_down=30
    time_in_neutral_down=150
    time_to_clutch_down=150
    fast=0
  }
  inertia
  {
    engine=0.23
  }
  braking_coeff=1
}
gearbox
{
  gears=6
  gear0
  {
    ratio=-5.224
    inertia=0.2
  }
  gear1
  {
    ratio=4.124
    inertia=0.1
  }
  gear2
  {
    ratio=2.641
    inertia=0.09
  }
  gear3
  {
    ratio=1.580
    inertia=0.08
  }
  gear4
  {
    ratio=1.000
    inertia=0.07
  }
  gear5
  {
    ratio=0.65
    inertia=0.05
  }
}
clutch
{
  max_torque=155
}
handbrakes
{
  wheels=23
}
differential
{
  type=1
  ratio=4.625
  inertia=0.2
  locking_coeff=0
  output0=0
  output1=1
}
aero
{
  body
  {
    center=0 0 0
    cx=0.35		
    area=1.75		
  }
  wings=2
  wing0
  {
    name=Front lift
    span=1
    cord=1
    coeff_drag=0
    coeff_down=-3
    center=0 0 1.14
    angle=0
    angle_offset=1
  }
  wing1
  {
    name=Rear lift
    span=1
    cord=1
    coeff_drag=0
    coeff_down=-7
    center=0 0 -1.17
    angle=0
    angle_offset=1
  }
}
antirollbar
{
  count=4
  arb0
  {
    susp_left=0
    susp_right=4
    k=100000
  }
  arb1
  {
    susp_left=1
    susp_right=5
    k=100000
  }
  arb2
  {
    susp_left=2
    susp_right=6
    k=100000
  }
  arb3
  {
    susp_left=3
    susp_right=7
    k=100000
  }
}
susp_front
{
  y=0.0
  z=1.5
  minlen=0.08
  maxlen=0.4
  restlen=0.35
  k=30000	
  bump_rate=800
  bump_function=0	;0=linear, 1=exp, 2=digressive, 3=sqrt
  rebound_rate=2000
  rebound_function=0
  anti_pitch=0
  camber_change_per_m=0.1
  caster_offset=0.0
  roll_center
  {
    x=0
    y=-0.4		; cm
    z=0
  }
}
susp_rear
{
  y=0.0
  z=-1.32
  minlen=0.03
  maxlen=0.4
  restlen=0.3
  k=30000	
  bump_rate=500
  bump_function=0
  rebound_rate=2000
  rebound_function=0
  anti_pitch=0
  camber_change_per_m=0.1
  roll_center
  {
    x=0
    y=-0.35		; cm
    z=0
  }
}
susp0~susp_front
{
  x=0.80
  ; Camber change ratio; degrees of camber / degrees of wheel rotation
  camber_change_steering=0.1
  ; Bump steer; toe change in radians per meter of suspension deflection
  toe_change_per_m=0.05
}
susp1~susp_front
{
  x=-0.85
  camber_change_steering=-0.1
  toe_change_per_m=-0.05
}
susp2~susp_rear
{
  x=0.85
  toe_change_per_m=-0.1
}
susp3~susp_rear
{
  x=-0.85
  toe_change_per_m=0.1
}

susp_model
{
  minlen=0.00
  maxlen=0.40
  restlen=0.30
  k=22000
  bump_rate=800
  bump_function=3
  rebound_rate=400
  rebound_function=3
  anti_pitch=0
  camber_change_per_m=0.5
  roll_center
  {
    x=0
    y=0
    z=0
  }
}
susp4~susp_model
{
  x=0.85
  y=-0.0
  z=1.14
}
susp5~susp_model
{
  x=-0.85
  y=-0.0
  z=1.14
}
susp6~susp_model
{
  x=0.85
  y=-0.0
  z=-1.17
}
susp7~susp_model
{
  x=-0.85
  y=-0.0
  z=-1.17
}


pacejka
{
	; Lateral force
	a0=1.3
	a1=-49
	a2=1200
	a3=1452
	a4=11
	a5=0
	a6=-0.04
	a7=-0.4
	a8=0.003
	a9=-0.002
	a10=0.16
	a111=-5
	a112=0.045
	a12=0.17
	a13=-23.5
	; Longitudinal force
	b0=1.5
	b1=-64
	b2=1350
	b3=6.8
	b4=444
	b5=0
	b6=0.0034
	b7=-0.008
	b8=0.66
	b9=0
	b10=0
	b11=0
	b12=0
	; Aligning moment
	c0=2.46
	c1=-2.75
	c2=-2.9
	c3=-0
	c4=-3.6
	c5=-0.1
	c6=0.0004
	c7=0.22
	c8=-2.31
	c9=3.87
	c10=0.0007
	c11=-0.05
	c12=-0.006
	c13=0.33
	c14=-0.04
	c15=-0.4
	c16=0.092
 	c17=0.0114
  optimal_slipratio=0.15
  optimal_slipangle=0.2
}
wheel_front
{
  x=0
  y=0
  z=0
  steering=1
  powered=1
  lock=75
  camber=0.2
  mass=25		
  inertia=0.6
  radius=0.390		
  rolling_coeff=0.012
  max_braking=2300
  braking_factor=0.75
  tire_rate=140000
  width=0.125
}
wheel_rear
{
  x=0
  y=0
  z=0
  steering=0
  powered=1
  camber=0.3
  mass=21		
  inertia=0.6
  radius=0.390		
  rolling_coeff=0.012
  max_braking=2400
  max_handbrake_torque=1500
  braking_factor=0.25
  tire_rate=140000
  width=0.125
}
wheel0~wheel_front
{
  toe=-0.7
  ackerman=1.1
  pacejka~pacejka
  {
  }
  model
  {
    file=left.dof
  }
  model_brake
  {
    file=
  }      
}
wheel1~wheel_front
{
  toe=0.7
  ackerman=-1.1
  pacejka~pacejka
  {
  }
  model
  {
    file=right.dof
  }
  model_brake
  {
    file=
  }
}
wheel2~wheel_rear
{
  toe=0.5
  pacejka~pacejka
  {
  }
  model
  {
    file=left.dof
  }
  model_brake
  {
    file=
  }
}
wheel3~wheel_rear
{
  toe=-0.5
  pacejka~pacejka
  {
  }
  model
  {
    file=right.dof
  }
  model_brake
  {
    file=
  }
}
wheel_suspmodel
{
  x=0
  y=0
  z=0
  steering=0
  powered=0
  camber=-5
  toe=0
  mass=1
  inertia=1
  radius=0.01
  rolling_coeff=0.015
  max_braking=2000
  braking_factor=1
  tire_rate=1000
  pacejka~pacejka
  {
  }
}
wheel4~wheel_suspmodel
{
   model
  {
    file=
  }
  model_brake
  {
    file=
  }
}
wheel5~wheel_suspmodel
{
  model
  {
    file=
  }
  model_brake
  {
    file=
  }
}
wheel6~wheel_suspmodel
{
  model
  {
    file=
  }
  model_brake
  {
    file=
  }
}
wheel7~wheel_suspmodel
{
   model
  {
    file=
  }
  model_brake
  {
    file=
  }
}
camera0
{
  name=Driver
  fov=55
  model=1
  view=0
  wheels=0
  offset
  {
    x=0.348
    y=0.75
    z=-0.1
  }
  offset_to
  {
    x=0.348
    y=0
    z=10
  }
  src
  {
    mass=1
    k=150
    damping=25
    maxdist=0.2
  }
  dst
  {
    mass=0
    k=0
    damping=0
    maxdist=0
  }
}
camera1
{
  name=Left
  fov=60
  model=1
  view=0
  wheels=0
  offset
  {
    x=0.35
    y=0.75
    z=-0.1
  }
  offset_to
  {
    x=15.4
    y=0
    z=10
  }
  src
  {
    mass=1
    k=250
    damping=25
    maxdist=0.2
  }
  dst
  {
    mass=0
    k=0
    damping=0
    maxdist=0
  }
}
camera2
{
  name=Right
  fov=60
  model=1
  view=0
  wheels=0
  offset
  {
    x=0.35
    y=0.75
    z=-0.1
  }
  offset_to
  {
    x=-14.6
    y=0
    z=10
  }
  src
  {
    mass=1
    k=250
    damping=25
    maxdist=0.2
  }
  dst
  {
    mass=0
    k=0
    damping=0
    maxdist=0
  }
}
camera3
{
  name=Rear
  fov=-65
  model=0
  view=0
  wheels=0
  offset
  {
    x=0.2
    y=0.8
    z=-0.2
  }
  offset_to
  {
    x=-2
    y=0
    z=-10
  }
  src
  {
    mass=1
    k=250
    damping=25
    maxdist=0.2
  }
  dst
  {
    mass=0
    k=0
    damping=0
    maxdist=0
  }
}
camera4
{
  name=Chase
  fov=60
  view=0
  follow
  {
    pitch=0
    yaw=1
    roll=0
  }
  offset
  {
    x=0
    y=-1
    z=-6
  }
  angle
  {
    x=10
    y=180
    z=0
  }
}
camera5
{
  name=Exterior
  fov=60
  view=0
  follow
  {
    pitch=0
    yaw=0
    roll=0
  }
  offset
  {
    x=0
    y=-1
    z=-6
  }
  angle
  {
    x=10
    y=0
    z=0
  }
}
camera6
{
  name=Rear chase
  fov=60
  view=0
  follow
  {
    pitch=1
    yaw=1
    roll=0
  }
  offset
  {
    x=0
    y=-1
    z=-6
  }
  angle
  {
    x=10
    y=-360
    z=0
  }
}
camera7
{
  name=FrontWheel
  fov=60
  model=0
  view=0
  wheels=0
  offset
  {
    x=1.4
    y=0.06
    z=-0.5
  }
  angle
  {
    x=-2.25
    y=-161
    z=3.3
  }
  follow
  {
    pitch=0
    yaw=1
    roll=1
  }
}
camera8
{
  name=Rear
  fov=60
  model=0
  view=0
  wheels=2
  follow
  {
    pitch=0
    yaw=1
    roll=1
  }
  offset
  {
    x=0.4
    y=-0.525
    z=-0.15
  }
  angle
  {
    x=0
    y=180
    z=0
  }
}
camera9
{
  name=Hood
  fov=55
  model=0
  wheels=0
  view=0
  follow
  {
    pitch=1
    yaw=1
    roll=1
  }
  offset
  {
    x=0
    y=-0.6
    z=0.5
  }
  angle
  {
    x=0
    y=180
    z=0
  }
}
;++++++++++++++++++++++++++++++++++++++ AUDIO +++++++++++++++++++++++++++++++++++++++++++++++
audio
{
  shiftout
  {
    sample=
  }
  shiftin
  {
    sample=
  }
	acc_all
	{
		attack=1000
		decay=1000
	}
	accelerate_out
	{	
		smp0~audio.acc_all
		{
			volume=1.0			
			sample=idle.wav
			min=0
			max=1800
			natural=800
			attack=800
			decay=200
		}
		smp1~audio.acc_all
		{
			volume=1.0			
			sample=mid.wav
			min=1800
			max=5000
			natural=5000
		}		
  }
  decelerate_out
  {
		smp0~audio.acc_all
		{
			volume=1.0			
			sample=idle.wav
			min=0
			max=1800
			natural=800
			attack=800
			decay=200
		}
		smp1~audio.acc_all
		{
			volume=1.0			
			sample=mid.wav
			min=1800
			max=5000
			natural=5000
		}		
	}
  ;------------------------
  skid
  {
    volume=1
    smp0
    {
      volume=0
      sample=
      min=0.15
      max=20
      ;attack=0.1
      ;decay=0.3
	}
  }
  gearwhine
  {
	 ; Pitch input is shaft rotational velocity in radians/sec
	pitch_scale=0.5
	pitch_offset=100
    smp0
    {
      sample=
      volume=
      min=
      max=
      decay=
      natural=
    }
  }
  skid
  {
    volume=0
    smp0
    {
      volume=0
      sample=
      min=0.15
      max=20
    }
  }
}