car
{
	name=Renault 5 Turbo WRC
	year=1982
        credits=Converted and modified by JerryCBM
        comments=Original by DiRT 3 & Jack7793 for GTA San Andreas
	id=renault5turbowrc
	version=090
	wheels=4
	skid
	{
		sample=skid.wav
	}
	shadow
	{
		texture=shadow.tga
		width=2.1
		length=4.35
	}
	cg
	{
		x=0
		y=0
		z=0
	}
	ff_factor=0.25
}

graphics
{
  shadow
  {
    model
    {
      file=shadow.dof
      use_shaders=1
    }
    intensity=0.3
  }
 } 
}

flares
{
  ; Headlights
  flare0
  {
    pos=0.70 0.15 1.90
    color=0.6 0.8 1
    normal=0 0 1
    z_offset=-2500
    size_factor=0.75
    intensity=0.15
    hor_scale=1
  }
  flare1
  {
    pos=-0.70 0.15 1.90
    color=0.6 0.8 1
    normal=0 0 1
    z_offset=-2500
    size_factor=0.75
    intensity=0.15
    hor_scale=1
  }
  ; Tail Lights
  flare2
  {
    pos=0.76 0.34 -2.06
    color=1 0 0.2
    normal=0 0 -1
    z_offset=-2500
    size_factor=0.5
    intensity=0.15
    hor_scale=1
  }
  flare3
  {
    pos=-0.76 0.34 -2.06
    color=1 0 0.2
    normal=0 0 -1
    z_offset=-2500
    size_factor=0.5
    intensity=0.15
    hor_scale=1
  }
  ; Brake Lights
  flare4
  {
    pos=0.75 0.10 -2.13
    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.75 0.10 -2.13
    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
  }
  ; 3rd Brake Lamp
  flare6
  {
    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=5
    rule=brake
    billboard=1
  }
}

body
{
	mass=905
	inertia
	{
	  x=1700
	  y=1995
	  z=487
	}
	width=2.210
	height=0.910
	length=4.140
	manual_box=1
	model
	{
          file=r5turbo.dof
	}
	model_incar
	{
          file=r5turbo.dof
	}
	model_braking_l
	{
          file=model_brakelights.dof
	}
	model_light_l
	{
          file=model_lights.dof
	}
	model_lightroad_l
	{
          file=model_lights.dof
	}
        model_reverse_l
        {
          file=lights_reverse.dof
        }
}

steer
{
	x=0.365
	y=0.285
	z=0.390
	xa=15
	lock=900
	linearity=0.75
	model
	{
          file=steering.dof
	}
}

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

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

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


engine
{

	mass=150

	idle_rpm=2500
	max_rpm=9000
	stall_rpm=750
	start_rpm=1000
	start_stalled=1
	starter_torque=100
	autoclutch_rpm=4000

	curve_torque=torque.crv
	max_torque=200

	shifting
	{
		automatic=0
		shift_up_rpm=8500
		shift_down_rpm=5000
		time_to_declutch=50
		time_to_clutch=50
		time_in_neutral=25
		time_to_declutch_down=50
		time_to_clutch_down=50
		time_in_neutral_down=25
	}
	inertia
	{
		engine=0.2
		final_drive=0.1
	}
	braking_coeff=2.5
	rolling_friction_coeff=0.1
}

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

gearbox
{
	gears=6

	gear0
	{
		ratio=-2.92
		inertia=.152
		linearity=1
	}

	gear1
	{
		ratio=3.266
		inertia=.126
		linearity=1
	}

	gear2
	{
		ratio=2.13
		inertia=.105
		linearity=1
	}

	gear3
	{
		ratio=1.517
		inertia=.094
		linearity=1
	}

	gear4
	{
		ratio=1.147
		inertia=.089
		linearity=1
	}

	gear5
	{
		ratio=0.738
		inertia=.079
		linearity=1
	}
}

differential
{
	type=1
	ratio=6.82
	inertia=.17
	locking_coeff=100
	output0=0
	output1=1
}

clutch
{
	max_torque=500
}

handbrakes
{
	wheels=23
}

aero
{
	body
	{
		center=0 0 0
		cx=0.35
		area=2.5
	}
	wings=1
	wing0
	{
		name=Rear Wing
		span=1.10
		cord=0.20
		coeff_drag=0.35
		coeff_down=3.25
		center=0 0 -1.75
		angle=25
		angle_offset=0
	}
}

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

susp_front
{
  y=-0.10
  z=1.45
  restlen=0.25
  minlen=0.05
  maxlen=0.25
  k=30000
  bump_rate=1500
  rebound_rate=3500
  bump_function=3
  rebound_function=0
  anti_pitch=0.25
  camber_change_per_m=0
  roll_center
  {
    x=0
    y=-0.15
    z=0
  }
}

susp_rear
{
  y=-0.10
  z=-1.675
  restlen=0.25
  minlen=0.05
  maxlen=0.25
  k=25000
  bump_rate=1250
  rebound_rate=3000
  bump_function=3
  rebound_function=0
  anti_pitch=0.08
  camber_change_per_m=0.05
  roll_center
  {
    x=0
    y=-0.10
    z=0
  }
}

susp0~susp_front
  {
    x=0.89
    toe_change_per_m=0.025
    camber_change_steering=0.10
    caster_offset=-0.015
  }
susp1~susp_front
  {
    x=-0.89
    toe_change_per_m=-0.025
    camber_change_steering=-0.10
    caster_offset=-0.015
  }
susp2~susp_rear
  {
    x=1 
    toe_change_per_m=0.02
  }
susp3~susp_rear
  {
    x=-1 
    toe_change_per_m=-0.02
  }

;----------------------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=1500
	a3=2000
	a4=8
	a5=0.015
	a6=-0.25
	a7=0.1
	a8=-0.03
	a9=-0.001
	a10=-0.15
	a111=-8.5
	a112=-0.29
	a12=17.8
	a13=-2.4
	b0=1.5
	b1=-70
	b2=1350
	b3=20
	b4=325
	b5=0.08
	b6=0
	b7=0.05
	b8=-0.025
	b9=0
	b10=0
	b11=0
	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.145
}

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
}

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

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

wheel_front~wheel_all
{
	y=0
	z=0
	steering=1
	powered=0
	lock=48
	mass=35
	inertia=0.30
	radius=0.37
	rolling_coeff=0.0180
	max_braking=2500
	braking_factor=0.80
	tire_rate=250000
	pacejka~pacejka
	{
	}
}

wheel_rear~wheel_all
{
	y=0
	z=0
	steering=0
	powered=1
	mass=35
	inertia=0.25
	radius=0.37
	rolling_coeff=0.0180
	max_braking=2500
	braking_factor=0.20
	max_handbrake_torque=2500
	tire_rate=230000
	pacejka~pacejka
	{
	}
}

wheel0~wheel_front
{
	x=0
	ackerman=1.15
	toe=0
	camber=0
	model
	{
	  file=wheel_left.dof
	}
	model_brake
	{
	  file=caliper_left.dof
	}
}

wheel1~wheel_front
{
	x=0
	ackerman=1.15
	toe=0
	camber=0
	model
	{
	  file=wheel_right.dof
	}
	model_brake
	{
	  file=caliper_right.dof
	}
}

wheel2~wheel_rear
{
	x=0
	toe=0
	camber=0
	model
	{
	  file=wheel_left.dof
	}
	model_brake
	{
	  file=caliper_left.dof
	}
}

wheel3~wheel_rear
{
	x=0
	toe=0
	camber=0
	model
	{
	  file=wheel_right.dof
	}
	model_brake
	{
	  file=caliper_right.dof
	}
}

ai
{
	grip_factor=1.1
}

audio
{
  skid
  {
    sample=skid.wav
  }
	acc_all
	{
		attack=1000
		decay=1000
	}
	accelerate_out
	{
		smp0~audio.acc_all
		{
			sample=idle.wav
			min=1
			max=2500
			natural=1000
			volume=0.75
		}
		smp1~audio.acc_all
		{
                        volume=7
			sample=mid4k.wav
			min=2500
			max=12000
			natural=5600
		}
		smp2~audio.acc_all
   		 {
			volume=0.5
      			sample=turbo2.wav
    			min=4000
 			max=12000
   			attack=1000
   			decay=1000
    			natural=10000
   		 }
                smp3~audio.acc_all
   		 {
			volume=0.5
      			sample=accelerating2.wav
    			min=7000
 			max=12000
   			attack=7500
   			decay=2000
    			natural=8000
   		 }              
                 smp4~audio.acc_all
		{
                        volume=0.7
			sample=a6000.wav
			min=3300
			max=8700
			natural=7100
		}
                smp5~audio.acc_all
   		 {
			volume=0.1
      			sample=pssh.wav
    			min=2000
 			max=7100
   			attack=1000
   			decay=1000
    			natural=5000
   		 }
      }
  decelerate_out
  {
		smp0~audio.acc_all
		{
			sample=mid4kde.wav
			min=1
			max=10000
			natural=4000
		}
                smp1~audio.acc_all
   		 {
			volume=1.6
      			sample=boxer.wav
    			min=6500
 			max=12000
   			attack=7500
   			decay=2000
    			natural=13000
   		 }
   	        smp2~audio.acc_all
                 {
                        sample=blowoff.wav
                        min=8000
                        max=15000
                        natural=1000
                 }
}
                 }
  }
}

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

camera0
{
        name=Inside Driver
	model=1
	wheels=0
	view=1
        fov=65

	offset
	{
		x=0.365
		y=0.68
		z=-0.45
	}
	offset_to
	{
		x=0.365
		y=0.5
		z=5
	}
	src
	{
		mass=0.1
		k=5000
		damping=100
		maxdist=1.5
	}
	dst
	{
		mass=1
		k=100
		damping=10
		maxdist=1.5
	}
}
camera1
{
  name=Driver, left
  fov=65
  model=1
  wheels=0
  view=1
   offset
  {
    x=0.334
		y=0.68
		z=-0.45
  }
  offset_to
  {
    x=10
    y=0.5
    z=15
  }
  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.334
		y=0.68
		z=-0.45
  }
  offset_to
  {
    x=-10
    y=0.5
    z=15
  }
  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.19
    y=0.65
    z=-0.65
  }
  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=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=Peek at Co-Driver
	model=1
	wheels=1
	view=1
        fov=60

	offset
	{
		x=-1.0
		y=-0.55
		z=-2.00
	}
	angle
	{
		x=10
		y=150
		z=0
	}
 	follow
	{
		pitch=1
		yaw=1
		roll=1
	}
}

camera7
{
        name=Cockpit camera
	model=1
	wheels=1
	view=1
        fov=60

	offset
	{
		x=0.0
		y=-0.65
		z=-1.0
	}
	angle
	{
		x=2.5
		y=180
		z=0
	}
 	follow
	{
		pitch=1
		yaw=1
		roll=1
	}
}

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

	offset
	{
		x=-0.375
		y=0.68
		z=-0.33
	}
	offset_to
	{
		x=-0.375
		y=0.5
		z=1
	}
	src
	{
		mass=0.1
		k=5000
		damping=100
		maxdist=1.5
	}
	dst
	{
		mass=1
		k=100
		damping=10
		maxdist=1.5
	}
}

camera9
{
	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
	}
}