car
{
  name=Volkswagen Passat B5 TDi
  year=2001
  id=VWPB5
  credits=Convert by Mnichu.
  comments=
  version=090b
  wheels=4
  shadow
  {
    texture=shadow.tga
    width=2.1
    length=4.9
    offset_z=0
    offset=0
  }
	cg
	{
		x=0
		y=-0.16
		z=0.33
	}
  ff_factor=0.35
  ff_gain=0.65
  ff_damping=0
  ff_friction=1
  ff_inertia=1
  ff_stickfriction=1
}
graphics
{
  	shadow
  	{
    		model
    		{
      			file=passat.dof
			use_shaders=0
    		}
		intensity=0.2
  	}
	generic
	{
		model0
		{
		file=mirror.dof
		}
		model1
		{
		file=mirror1.dof
		}
		model2
		{
		file=signal_fl.dof
		}
		model3
		{
		file=signal_fr.dof
		}
    		model4
    		{
      		file=signal_rl.dof
    		}
    		model5
    		{
      		file=signal_rr.dof
    		}
    		model6
    		{
      		file=signal_il.dof
    		}
    		model7
    		{
      		file=signal_ir.dof
    		}
    		model8
    		{
      		file=fog_front.dof
    		}
    		model9
    		{
      		file=fog_in.dof
    		}
    		model10
    		{
      		file=high_beam.dof
    		}
    		model11
    		{
      		file=high_beam_in.dof
    		}
	}
}
body
{
	x=0
	y=0
	z=0
	mass=1644  ;(wheels mass=31.6kg + engine=120kg + driver=80kg + body=964)
	inertia
	{
    	x=3780
    	y=4300
    	z=760
	}
  	width=1.857
  	height=1.398
  	length=4.200
	manual_box=1
	model
	{
		file=passat.dof
	}
	model_incar
	{
		file=passat.dof
	}
	model_light_l
	{
		file=lights.dof
	}
	model_braking_l
	{
		file=brake.dof
	}
 model_lightroad_l
 {
  file=lightsin.dof
 }
  model_reverse_l
  {
    ; Reverse gear indicators
    file=re.dof
  }
  model_reverse_r
  {
    file=re.dof
}
}
lights
{
  ; Projected lights
  light0
  {
    texture=lampy.tga
    ; Field of view (vertical)
    fov=25.0
    ; Aspect (horizontal)
    aspect=4.0
    ; Distance to car
    z=1.20
    ; Pitching with respect to car (in degrees)
    pitch=7
  }
}
abs
{
  enable=1
  braking_factor=1.2
  max_velocity_ratio=1.34
  min_velocity_ratio=1.17
  min_velocity=1
}
traction_control
{
  enable=0
  max_velocity_ratio=1.0500000
  min_velocity_ratio=1.0499999
  min_velocity=5
}
wipers
{
  ; Windscreen wipers
  count=3
  wiper0
  {
    x=-0.28
    y=0.35
    z=-1.64
    xa=-75
    min_angle=5
    max_angle=-85
    model
    {
      file=wiper.dof
    }
  }
  wiper1
  {
    x=0.165
    y=0.33 
    z=0.83
    xa=55
    min_angle=5
    max_angle=-82
    model
    {
      file=wiper1.dof
    }
  }
  wiper2
  {
    x=0.49
    y=0.33 
    z=0.79
    xa=55
    min_angle=2
    max_angle=-82
    model
    {
      file=wiper2.dof
    }
  }
}
steer
{
  x=0.38
  y=0.295
  z=0.12
  radius=0
  xa=0
  ; 3.5 turns lock-to-lock
  lock=900
  model
  {
    file=kierownica.dof
  }
}

engine
{
  mass=150
  idle_method=1
  idle_throttle=0
  idle_rpm=850
  max_rpm=5000
  max_torque=350
  
  sample=engine.wav
  sample_rpm=1000

  curve_torque=torque.crv
  autoclutch_rpm=1200
  starter=1
  starter_torque=65
  start_stalled=1
  stall_rpm=500
  start_rpm=850
  reaction=0
  shifting
  {
    automatic=0
    shift_up_rpm=4500
    shift_down_rpm=1200
    time_to_declutch=325
    time_to_clutch=135
  }
  inertia
  {
    engine=0.7
  }
  braking_coeff=2
}

; gearbox ratios section

gearbox
{
  gears=7
  gear0
  {
    ratio=-3.44
    inertia=0.163
  }
  gear1
  {
    ratio=3.478
    inertia=0.121
  }
  gear2
  {
    ratio=2.076
    inertia=0.072
  }
  gear3
  {
    ratio=1.360
    inertia=0.048
  }
  gear4
  {
    ratio=0.903
    inertia=0.035
  }
  gear5
  {
    ratio=0.686
    inertia=0.029
  }
  gear6
  {
    ratio=0.561
    inertia=0.016
  }
  end_ratio=3.444
}
clutch
{
  max_torque=850
}
differential
{
  type=1
  ratio=3.444
  locking_coefficient=25
  output0=0
  output1=1
}
handbrakes
{
	wheels=23
}
aero
{
	body
	{
		center=0 0 0
		cx=0.31
		area=2.3
	}
	wings=1
	wing0
	{
		name=Rear spoiler
		span=1
		cord=1
		coeff_drag=0
		coeff_down=10
		center=0 0 -1
		angle=0
		angle_offset=10
	}
}


antirollbar
{
	count=2
	arb0
	{
		susp_left=0
		susp_right=1
		k=12500
	}
	arb1
	{
		susp_left=2
		susp_right=3
		k=12250
	}
}

susp_front
{
	y=0.0
  	z=1.05
	restlen=0.411			;293	395kg
	minlen=0.22
	maxlen=0.46
	k=43781.6943144			;@ static load and 1.316 NF SR
	bump_rate=4600		;0.7	1944
	rebound_rate=4600	;0.7	6531
	bump_function=0
	rebound_function=0
	anti_pitch=0.1
	camber_change_per_m=0.067
	roll_center
	{
		x=0
		y=-0.552	;60mm
		z=0
	}
}

susp_rear
{
	y=0.04
  	z=-1.665
	restlen=0.370			;305	275kg
	minlen=0.2
	maxlen=0.43
	k=43781.6943144			;@ static load and 1.502 NF SR
	bump_rate=4600		;0.75	1852
	rebound_rate=4200	;0.8	5191
	bump_function=0
	rebound_function=0
	anti_pitch=0.1
	camber_change_per_m=0.14
	roll_center
	{
		x=0
		y=-0.504	;120mm
		z=0
	}
}

susp0~susp_front
{
	x=0.755
	camber_change_steering=0.147	;0.25 rad ~ 14.5 degree camber with 1 radian rotation of steering @ 8 degree caster
	caster_offset=-0.0235		;8 degrees static caster -0.0235	
	toe_change_per_m=0
}
susp1~susp_front
{
	x=-0.755
	camber_change_steering=-0.147	;0.25 rad ~ 14.5 degree camber with 1 radian rotation of steering @ 8 degree caster
	caster_offset=-0.0235		;5.78 degrees static caster -0.0235
	toe_change_per_m=0
}

susp2~susp_rear
{
	x=0.77
}
susp3~susp_rear
{
	x=-0.77
}

;----------------------tyres----------------------

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.25
    	a1=-35
    	a2=1300
    	a3=2000
    	a4=8
    	a5=0.015
    	a6=-0.25
    	a7=0.1
    	a8=-0.03
    	a9=-0.001
    	a10=-0.15
    	a111=-4.3
    	a112=-0.29
    	a12=17.8
    	a13=-2.4

    	b0=1.5
    	b1=-70
    	b2=1300 
    	b3=21
    	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.11
    	optimal_slipangle=0.157
}

;----------------------wheels----------------------

wheel_front
{
	y=0
	z=0
	steering=1
	powered=1
	lock=52
	mass=15.8
	inertia=0.3990519
	radius=0.36
	rolling_coeff=0.015
	max_braking=2225
	braking_factor=1
	tire_rate=160000
	pacejka~pacejka
	}
}

wheel_rear
{
	y=0
	z=0
	steering=0
	powered=0
	power_gearing=0 	;FWD
	mass=15.8
	inertia=0.3990519
	radius=0.335
	rolling_coeff=0.0150
	max_braking=500
	braking_factor=0.75
	max_handbrake_torque=3500
	tire_rate=160000
	pacejka~pacejka
	}
}

wheel0~wheel_front
{
	x=0
	ackerman=1.1 
	toe=-0.1695
	camber=-0.2	
	model
	{
		file=stall.dof
	}
	model_brake
	{
		file=caliper_left.dof
	}
}

wheel1~wheel_front
{
	x=0
	ackerman=1.1
	toe=0.1695
	camber=-0.2
	model
	{
		file=stalp.dof
	}
	model_brake
	{
		file=caliper_right.dof
	}
}

wheel2~wheel_rear
{
	x=0
	toe=-0.133
	camber=-1.2	
	model
	{
		file=stall.dof
	}
	model_brake
	{
		file=caliper_left1.dof
	}
}

wheel3~wheel_rear
{
	x=0
	toe=0.133
	camber=-1.2
	model
	{
		file=stalp.dof
	}
	model_brake
	{
		file=caliper_right1.dof
	}
}

camera0
{
  name=Driver
  fov=70
  model=1
  wheels=0
  view=1
  offset
  {
    x=0.375
    y=0.485
    z=-0.18
  }
  offset_to
  {
    x=0.43
    y=-0.5
    z=10
  }
  src
  {
    mass=0
    k=0
    damping=0
    maxdist=0
  }
  dst
  {
    mass=0
    k=0
    damping=0
    maxdist=0
  }
}
camera1
{
  name=Driver, left
  fov=60
  model=1
  wheels=0
  view=1
  offset
  {
    x=0.37
    y=0.49
    z=-0.16
  }
  offset_to
  {
    x=10.43
    y=0.5
    z=10
  }
  src
  {
    mass=0
    k=0
    damping=0
    maxdist=0
  }
  dst
  {
    mass=0
    k=0
    damping=0
    maxdist=0
  }
}
camera2
{
  name=Driver, right
  fov=60
  model=1
  wheels=0
  view=1
  offset
  {
    x=0.37
    y=0.49
    z=-0.16
  }
  offset_to
  {
    x=-9.57
    y=0.5
    z=10
  }
  src
  {
    mass=0
    k=0
    damping=0
    maxdist=0
  }
  dst
  {
    mass=0
    k=0
    damping=0
    maxdist=0
  }
}
camera3
{
  name=Driver, rear
  fov=-65
  model=0
  wheels=0
  view=0
  offset
  {
    x=0.1
    y=0.49
    z=-0.03
  }
  offset_to
  {
    x=-1
    y=0.5
    z=-10
  }
  src
  {
    mass=1
    k=250
    damping=25
    maxdist=0.3
  }
  dst
  {
    mass=1
    k=0
    damping=0
    maxdist=0
  }
}
camera4
{
  name=Chase
  fov=60
  model=0
  wheels=0
  view=0
  offset
  {
    x=0
    y=-0.5
    z=-5
  }
  follow
  {
    pitch=0
    yaw=1
    roll=0
  }
  angle
  {
    x=15
    y=180
    z=0
  }
}
camera5
{
  name=Chase rear
  fov=60
  model=0
  wheels=0
  view=0
  offset
  {
    x=0
    y=-0.5
    z=-5
  }
  follow
  {
    pitch=0
    yaw=1
    roll=0
  }
  angle
  {
    x=15
    y=0
    z=0
  }
}
camera6
{
  name=Free exterior
  fov=60
  model=0
  wheels=0
  view=0
  offset
  {
    x=0
    y=-0.5
    z=-5
  }
  follow
  {
    pitch=0
    yaw=0
    roll=0
  }
  angle
  {
    x=10
    y=180
    z=0
  }
}
camera7
{
	name=Side
	fov=60
	model=0
	wheels=0
	view=0
	offset
	{
		x=1.267185
		y=0.129164
		z=-2.6
	}
	angle
	{
		x=1.361085
		y=-165.972626
		z=1.298599
	}
	follow
	{
		pitch=0
		yaw=1
		roll=1
	}

}
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=-17
  }
  angle
  {
    x=10
    y=50
    z=0
  }
}
camera9
{
	name=Bonnet
	fov=60
	model=0
	wheels=0
	view=0
	offset
	{
		x=0.356
    		y=-0.75
    		z=0.55
	}
	follow
	{
		pitch=1
		yaw=1
		roll=1
	}
	angle
	{
		x=5
		y=180
		z=0
	}
}
audio
{
  skid
  {
    sample=skid.wav
  }
  acc_all
  {
    attack=1000
    decay=1000
  }
  acc_turbo
  {
   attack=2000
   decay=2000
  }
  accelerate_out
  {
    volume=2.0
    smp0~audio.acc_all
    {
      sample=idle.wav
      min=0
      max=800
      attack=1000
      decay=1000
      natural=1500
    }
    smp1~audio.acc_all
    {
      sample=low.wav
      min=1000
      max=2000
      attack=1000
      decay=1000
      natural=10000
    }
    smp2~audio.acc_all
    {
      sample=mid.wav
      min=2000
      max=3000
      attack=1000
      decay=1000
      natural=20000
    }
    smp3~audio.acc_all
    {
      sample=hi.wav
      min=3000
      max=5000
      attack=1000
      decay=1000
      natural=30000
    }
    smp4~audio.acc_turbo
    {
    volume=0.06
    sample=turbo.wav
    min=3000
    max=8000
    natural=1750
    attack=2300
    decay=3000
  }
  }
  ;------------------ IN
  accelerate_in
  {
    smp0~audio.acc_all
    {
      sample=idlei.wav
      min=1
      max=900
      natural=1000
      volume=1
    }
    smp1~audio.acc_all
    {
      sample=lowi.wav
      min=1000
      max=2001
      natural=2000
      volume=1
    }
    smp2~audio.acc_all
    {
      sample=midi.wav
      min=3000
      max=4001
      natural=4000
      volume=1
    }
    smp3~audio.acc_all
    {
      sample=hii.wav
      min=4000
      max=6000
      natural=6000
      volume=1
    }
  }
  decelerate_in
  {
    smp0~audio.acc_all
    {
      sample=idlei.wav
      min=1
      max=900
      natural=850
      volume=1.25
      attack=1300
      decay=1300
    }
    smp1~audio.acc_all
    {
      sample=lowi.wav
      min=1000
      max=1501
      natural=2000
      volume=0.8
      attack=1300
    }
    smp2~audio.acc_all
    {
      sample=midi.wav
      min=3000
      max=4001
      natural=4000
      volume=1
    }
    smp3~audio.acc_all
    {
      sample=hii.wav
      min=4000
      max=6000
      natural=6000
      volume=1
    }
  }
  gearwhine
  {
    volume=0.5
    pitch_scale=0.001
    pitch_offset=0
    smp0~audio.acc_all
    {
      sample=gearwhine.wav
      min=0
      max=10000
      natural=7000
    }
  }
  wind
  {
    volume=1
    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
    }
  }
}