car
{
   name=Peugeot 309 GTI
   year=1989
   credits=Converted and modified by JerryCBM
   comments=Original by Demolittion from GTA San Andreas
   id=peugeot309gti
   version=090b
   wheels=4
   skid
   {
      sample=skid.wav
   }
   shadow
   {
      texture=shadow.tga
      width=2.033
      length=3.813
      offset_z=0.06
   }
   cg
   {
      x=0
      y=-0.105
      z=0.3
   }
}
flares
{
  ; Front lights
  flare0
  {
    pos=-0.50 -0.12 2 
	;normal=0 0 1
	normal=-0.05 -0.02 0.6
	z_offset=-3000
	size_factor=1
  }
  flare1
  {
    pos=0.50 -0.12 2 
	normal=0.05 -0.02 0.6
	z_offset=-3000
	size_factor=1
  }

}
body
{
   mass=930
   inertia
   {
      x=3000
      y=2700
      z=1200
   }
   x=0
   y=0
   z=0
   width=1.6789
   height=0.0993   
   length=4.3840
   manual_box=0
   model
   {
      file=my_309.dof
   }
   model_braking_l
   {
      file=stop.dof
   }
   model_incar
   {
      file=my_309.dof
   }
   model_light_l
   {
      file=lights.dof
   }
 model_lightroad_l
 {
  file=lights.dof
 }
}


steer
{
  x=0.33
  y=0.035
  z=0.52
  radius=10
  xa=20
  lock=1080
  linearity=0.25
  model
  {
    file=volante.dof
  }
}
engine
{
	x=0
	y=0
	z=0.50  
	size=0.25
	mass=  

	idle_rpm=750
	max_rpm=8000
	curve_torque=dyn.crv
	max_torque=165 (128cv)
	stall_rpm=500
	start_rpm=1500
	start_stalled=1
	starter_torque=200
	autoclutch_rpm=1500

	shifting
	{
		automatic=0
      shift_up_rpm=8000
      shift_down_rpm=4500
      time_to_declutch=100
		time_to_clutch=80
		time_in_neutral=100
		time_to_declutch_down=135
		time_to_clutch_down=135
		time_in_neutral_down=135
	}
	inertia
	{
		engine=0.1587
	}
	braking_coeff=2.5
	rolling_friction_coeff=0.1
	sample=ex_power4380.wav
	sample_rpm=4380
}

;----------------------drivetrain----------------------


gearbox
{
   gears=6
   gear0
   {
      ratio=-3.333
      inertia=0.2
   }
   gear1
   {
      ratio=2.923
      inertia=-0.1
      engine_map=13.64
   }
   gear2
   {
      ratio=1.85
      inertia=-0.05
      engine_map=8.35
   }
   gear3
   {
      ratio=1.36
      inertia=0.06
      engine_map=5.82
   }
   gear4
   {
      ratio=1.069
      inertia=0.07
      engine_map=4.54
   }
   gear5
   {
      ratio=0.865
      inertia=0.06
      engine_map=3.64
  }
  end_ratio=3.688
}
differential
{
   type=1
   ratio=4.000
   inertia=0.15
   locking_coeff=60
   clutches=1
   output0=0
   output1=1
}
clutch
{
	max_torque=250
}
handbrakes
{
	wheels=23
}
aero
{
   body
   {
      center=0 0 0
      cx=0.34
      area=1.91
   }
   wings=0
}
antirollbar
{
   count=2
   arb0
   {
      susp_left=0
      susp_right=1
      k=4000
   }
   arb1
   {
      susp_left=2
      susp_right=3
      k=4000
   }
}
susp_front
{
	y=0.01
	z=1.348
	restlen=0.465			;293	395kg
	minlen=0.12
	maxlen=0.365
	restlen=0.765			;293	395kg
	minlen=0.12
	maxlen=0.365
	k=82946			;@ static load and 1.316 NF SR
	bump_rate=9950		;0.7	1944
	rebound_rate=9950	;0.7	6531
	bump_function=0
	rebound_function=0
	anti_pitch=0.9
	camber_change_per_m=0.067
	roll_center
	{
		x=0
		y=-0.552	;60mm
		z=0
	}
}

susp_rear
{
	y=0.01
	z=-0.980
	restlen=0.485			;305	275kg
	minlen=0.1
	maxlen=0.335
      k=87009			;@ static load and 1.502 NF SR
	bump_rate=8750		;0.75	1852
	rebound_rate=8400	;0.8	5191
	bump_function=0
	rebound_function=0
	anti_pitch=0.14
	camber_change_per_m=0.14
	roll_center
	{
		x=0
		y=-0.552	;120mm
		z=0
	}
}

susp0~susp_front
{
   x=0.70
}
susp1~susp_front
{
   x=-0.70
}
susp2~susp_rear
{
   x=0.70
}
susp3~susp_rear
{
   x=-0.70
}
tire_model
{
   relaxation_length_lat=0.91
   relaxation_length_long=.091
   damping_speed=0.15
   damping_coefficient_lat=0.75
   damping_coefficient_long=1.5
}
pacejka
{
; Lateral force
a0=1.1
a1=-46
a2=1350
a3=4000
a4=11
a5=0.013
a6=-0.14
a7=0.14
a8=0.019
a9=-0.019
a10=-0.18
a111=-11
a112=-0.021
a12=0.48
a13=10.2

a13=-2.4
; Longitudinal force
b0=1.35326

b1=-90.00000
b2=3800
b3=23.30000
b4=400.00000
b5=0.00000
b6=0.00680
b7=0.05500
b8=-0.02400
b9=0
b10=0
b11=0
b12=0
; Aligning moment
c0=2.10000
c1=-3.90000
c2=-3.90000
c3=-1.26000
c4=-8.20000
c5=0.02500
c6=0.00000
c7=0.04400
c8=-0.58000
c9=0.18000
c10=0.04300
c11=0.04800

c12=-0.00350
c13=-0.18000
c14=0.14000
c15=-1.02900
c16=0.27000
c17=-1.10000
optimal_slipratio=0.14
optimal_slipangle=0.28
}
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_front
{
   y=0
   z=0
   max_braking=1100
   braking_factor=1
   steering=1    ;Turning Diameter (ft.) 34.40
   lock=60 
   ackerman=1.17
   mass=16
   inertia=1
   radius=0.29   ;0.7554=Tires 185/60HR14
   width=0.157		
   tire_rate=240000
   friction_road=1.7
   slices=15
   pacejka~pacejka
   {
   }
}
wheel_rear
{
   y=0
   z=0 
   max_braking=450
   braking_factor=1
   steering=0
   mass=16
   inertia=1
   radius=0.29 ;0.7554=Tires 185/60HR14
   width=0.157	
   max_handbrake_torque=2500
   tire_rate=240000
   friction_road=1.7
   slices=15
   pacejka~pacejka
   {
   }
}
wheel0~wheel_front
{
   x=0
   y=0
   z=0
   camber=-0.5
   toe=-0.16
   model
   {
      file=left.dof
   }
}
wheel1~wheel_front
{
   x=0
   y=0
   z=0
   camber=-0.5
   toe=0.16
   model
   {

      file=right.dof
   }
}
wheel2~wheel_rear
{
   x=0
   y=0
   z=0
   camber=-1.667
   toe=-0.4
   model
   {
      file=left.dof
   }
}
wheel3~wheel_rear
{
   x=0
   y=0
   z=0
   camber=-1.667


   toe=0.4
   model
   {
      file=right.dof
   }
}
camera0
{
  name=Driver
  fov=65
  model=1
  view=0
  wheels=0
  follow
  {
    pitch=1
    yaw=1
    roll=1
  }
  offset
  {
    x=0.32
    y=-0.31
    z=-0.75
  }
  offset_to
  {
    x=0.37
    y=-0.2
    z=10
  }
  angle
  {
    x=0
    y=180
    z=0.000000
  }
}
camera1
{
  name=Driver, left
  fov=60
  model=1
  wheels=0
  view=1
  offset
  {
    x=0.32
    y=0.31
    z=-75
  }
  offset_to
  {
    x=10.43
    y=0.5
    z=10
  }
  src
  {
    mass=1
    k=250
    damping=25
    maxdist=0.3
  }
  dst
  {
    mass=0
    k=0
    damping=0
    maxdist=0
  }
}
camera2
{
  name=Driver, right
  fov=60
  model=1
  wheels=0
  view=1
  offset
  {
    x=0.32
    y=0.31
    z=-75
  }
  offset_to
  {
    x=-9.57
    y=0.5
    z=10
  }
  src
  {
    mass=1
    k=250
    damping=25
    maxdist=0.3
  }
  dst
  {
    mass=0
    k=0
    damping=0
    maxdist=0
  }
}
camera3
{
  name=Driver, rear
  fov=-65
  model=1
  wheels=0
  view=0
  offset
  {
    x=0
    y=0.41
    z=-0.75
  }
  offset_to
  {
    x=-1
    y=0.5
    z=-10
  }
  src
  {
    mass=1
    k=250
    damping=25
    maxdist=0.3
  }
  dst
  {
    mass=0
    k=0
    damping=0
    maxdist=0
  }
}
camera4
{
  name=Chase
  fov=60
  model=0
  wheels=0
  view=0
  offset
  {
    x=0
    y=-0.2
    z=-4.8
  }
  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.4
    z=-4.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=-7
  }
  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=0.2
		y=0
		z=-2.6
	}

	angle
	{
		x=-1.361085
		y=150
		z=10
	}
	follow
	{
		pitch=0
		yaw=1
		roll=1
	}

}
camera8
{
	name=Bonnet
	fov=60
	model=0
	wheels=0
	view=0
	offset
	{
		x=0
		y=-0.4
		z=0.9
	}
	follow
	{
		pitch=1
		yaw=1
		roll=1
	}
	angle
	{
		x=5
		y=180
		z=0
	}
}
camera9
{
 	name=External
 	fov=70
 	model=0
 	view=0
 	wheels=0
 	follow
 	{
  		pitch=0
  		yaw=0
  		roll=0
 	}
 	offset
 	{
  		x=-0.1
  		y=-0.3
  		z=-3.6
 	}
 	angle
 	{
  		x=0
  		y=-20
  	      z=30
 	}
}

audio
{
  skid
  {
    ; New style (multiple samples mixed)
    ; Master volume for this set
    volume=1
    ; Acceleration
	; Outside of the car
    smp0
    {
      volume=0.4
      sample=audio/skid_01.wav
      min=0.3
      max=0.3
      attack=0.2
      decay=0.4
    }
    smp1
    {
      volume=0.6
      sample=audio/skid_02.wav
      min=0.6
      max=20
      attack=0.4
      decay=0
    }
  }
  acc_all
  {
    attack=1000
    decay=1000
	;pitch_scale=3
	; pitch = pitch_scale * pitch_input + pitch_offset
	;pitch_offset=50
  }
  accelerate_out
  {
    volume=0.5
    smp0~audio.acc_all
    {
      sample=audio/idle.wav
      min=0
      max=1250
      attack=1000
      decay=1000
      natural=900
    }
    smp1~audio.acc_all
    {
      sample=audio/7000.wav
      min=1500
      max=8001
      natural=4700
    }
  }
  decelerate_out
  {
    volume=0.5
    smp0~audio.acc_all
    {
      sample=audio/idle.wav
      min=0
      max=1250
      attack=1000
      decay=1000
      natural=900
    }
    smp1~audio.acc_all
    {
      sample=audio/7000.wav
      min=1500
      max=8001
      natural=5000
    }
  }
  wind
  {
    volume=0.80
    pitch_scale=1
    pitch_offset=50
    smp0
    {
      sample=audio/wind1.wav
      min=25
      max=26
      attack=33
      decay=33
      natural=80
    }
    smp1
    {
      sample=audio/wind2.wav
      min=50
      max=51
      attack=33
      decay=33
      natural=80
    }
    smp2
    {
      sample=audio/wind3.wav
      min=75
      max=76
      attack=33
      decay=33
      natural=80
    }
  }
  horn
  {
	sample=audio/horn.wav
  }
}
;----------------------driving aids----------------------

traction_control
{
	max_velocity_ratio=1.1
	min_velocity_ratio=1.05
	enable=0
}

abs
{
	max_velocity_ratio=1.1
	min_velocity_ratio=1.1
	enable=0
}
