car
{
	name=Audi S3 A
	year=2003 (Typ 8L)
	credits=Audi BAM 1.8T 20V "DOHC 5V TURBO" inline-4, 1781 cm³, 225 cv @ 5900 rpm, 28.5 kgfm @ 2200-5500 rpm
        comments=Haldex Traction QUATTRO. Turbine KKK K04 1.7 - 2.1 bar (Booster). 0-100km/h: 6.6 s, Top: 243 km/h
	id=audis3
	version=090
	wheels=4
	skid
	{
		sample=skid.wav
	}
	shadow
	{
		texture=shadow.tga
		width=2.6
		length=5
	}
	cg
	{
		x=0
		y=-0.068	;1444mm high, 38% of roof height ~ 55cm CofG
		z=0.2	;59/41
	}
	ff_factor=0.25
}


particles
{ 
backfire
{
exhaust0
{
pos=0.2658 -0.3309 -2.088
normal=0 0 -1
} 
exhaust1
{
pos=0.3458 -0.3309 -2.088
normal=0 0 -1
} 
exhaust2
{
pos=0.2658 -0.3309 -2.088
normal=0 0 -1
} 
exhaust3
{
pos=0.3458 -0.3309 -2.088
normal=0 0 -1
} 
exhaust4
{
pos=0.2658 -0.3309 -2.088
normal=0 0 -1
} 
exhaust5
{
pos=0.3458 -0.3309 -2.088
normal=0 0 -1
} 
type=backfire
; type=backfire_long
min_rpm=6500
; min_rpm=0
; suppose car comes from 9000 rpm for example. Then backfiring can happen when max_rpm is reached
max_rpm=7000
; max_rpm=12000
; high backfire likeliness for rally cars
likeliness_percentage=130
; likeliness_percentage=100
}
}

graphics
{
  shadow
  {
    model
    {
      file=shadow.dof
      use_shaders=1
    }
    intensity=0.3
  }
  generic
  {
    model0
    {
      file=
      offset
      {
        x=0.375
        y=0.5
        z=-0.2
      }
    }
    model1
    {
      file=
      offset
      {
        x=0.375
        y=0.5
        z=-0.2
      }
    }
    model2
    {
      file=signal_left.dof
    }
    model3
    {
      file=signal_right.dof
    }
    model4
    {
      file=bonnet.dof
    }
    model5
    {
      file=boot.dof
    }
    model6
    {
      file=door_fl.dof
    }
    model7
    {
      file=door_fr.dof
    }
    model8
    {
      file=door_rl.dof
    }
    model9
    {
      file=door_rr.dof
    }
    model10
    {
      file=zdp.dof
    }
    model11
    {
      file=szyberdach.dof
    }
    model12
    {
      file=zdt.dof
    }
  model13
    {
      file=engine.dof
    }
  model14
    {
      file=podlogabag.dof
    }
  model15
    {
      file=wlewpaliwa.dof
    }
 model16
    {
      file=turbosprezarka.dof
    }
model17
    {
      file=engine.dof
    }
model18
    {
      file=drvhead.dof
    }
model19
    {
      file=psghead.dof
    }
model20
    {
      file=antenaCB.dof
    }
  }
}

body
{
	x=0
	y=0
	z=0
	mass=1440	;1480kg kerb weight, -140kg unsprung +80kg driver 20kg fuel
	inertia
	{
		x=1850
		y=2100
		z=520
	}
	restitution_coeff=0.1
	width=1.64
	height=1.20
	length=3.71
	manual_box=1
	model
	{
		file=s3.dof
	}
	model_incar
	{
		file=s3.dof
	}
	model_light_l
	{
		file=lights.dof
	}
	model_braking_l
	{
		file=brakes.dof
	}
 model_lightroad_l
 {
  file=lightsin.dof
 }
}

steer
{
	x=0.35
	y=0.255 ;0.307
	z=0.3 ;0.325
	xa=20
	lock=540				
	linearity=0.3
	model
	{
		file=steer.dof
		lod0_z=0
		lod_out=2
	}
}

engine
{
	x=0
	y=0
	z=0
	size=0
	mass=0

	idle_rpm=850
	max_rpm=7000
	stall_rpm=500
	start_rpm=1500
	start_stalled=1
	starter_torque=100
	autoclutch_rpm=1500

	curve_torque=torques3.crv
	max_torque=578 ;175 ;torque/2 ;260
	shifting
	{
		automatic=0
		shift_up_rpm=6500
		shift_down_rpm=3000
		time_to_declutch=50
		time_to_clutch=50
		time_in_neutral=200
		time_to_declutch_down=150
		time_to_clutch_down=50
		time_in_neutral_down=200
	}
	inertia
	{
		engine=0.27
		final_drive=0.1
	}
	braking_coeff=2.5
	rolling_friction_coeff=0.1
	sample=engine.wav
	sample_rpm=5900
}

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

gearbox
{
	gears=7

	gear0
	{
		ratio=-4.107
		inertia=0.02
		linearity=0.5
	}

	gear1
	{
		ratio=3.417
		inertia=0.03
		linearity=1
	}

	gear2
	{
		ratio=2.105
		inertia=0.04
		linearity=1.2
	}

	gear3
	{
		ratio=1.429
		inertia=0.05
		linearity=1.4
	}

	gear4
	{
		ratio=1.088
		inertia=0.06
		linearity=1.6
	}

	gear5
	{
		ratio=0.866
		inertia=0.08
		linearity=1.8
	}

	gear6
	{
		ratio=0.720
		inertia=0.1
		linearity=2
	}
}

differential
{
	type=1
	ratio=4.2
	inertia=0.1
	locking_coeff=100 ;25
	output2=2
	output3=3
}

clutch
{
	max_torque=820 ;350
}

handbrakes
{
	wheels=23
}

aero
{
	body
	{
		center=0 0 0
		cx=0.335
		area=2.06
	}
	wings=1
	wing0
	{
		name=lift
		span=1
		cord=1
		coeff_drag=0
		coeff_down=0
		center=0 0 0
		angle=0
		angle_offset=10
	}
}

antirollbar
{
	count=2
	arb0
	{
		susp_left=0
		susp_right=1
		k=41000
	}
	arb1
	{
		susp_left=2
		susp_right=3
		k=34000
	}
}

susp_front
{
	y=0
	z=1.22 ;1.20
	restlen=0.451			;293	395kg
	minlen=0.22
	maxlen=0.46
	k=27000			;@ static load and 1.316 NF SR
	bump_rate=1350		;0.7	1944
	rebound_rate=4600	;0.7	6531
	bump_function=0
	bump_max=1500
	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
	z=-1.33 ;-1.32
	restlen=0.420			;305	275kg
	minlen=0.2
	maxlen=0.43
	k=24500			;@ static load and 1.502 NF SR
	bump_rate=1400		;0.75	1852
	rebound_rate=4200	;0.8	5191
	bump_function=0
	bump_max=1500
	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.77 ;0.7565
	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.77 ;-0.7565
	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 ;0.7435
}
susp3~susp_rear
{
	x=-0.77 ;-0.7435
}

;----------------------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=-8.5
	a112=-0.29
	a12=17.8
	a13=-2.4
	b0=1.5
	b1=-70
	b2=1380 ;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_front
{
	y=0
	z=0
	steering=1
	powered=1
	lock=70
	mass=35
	inertia=1.4
	radius=0.31715
        width=0.225		
	rolling_coeff=0.0180
	max_braking=1400 ;1500
	braking_factor=1
	tire_rate=250000
	pacejka~pacejka
	{
	}
}

wheel_rear
{
	y=0
	z=0
	steering=0
	powered=1
	power_gearing=0.53	;20% rear drive, no diff, equal drive :eek:
	mass=35
	inertia=1.35
	radius=0.31715
        width=0.225		;225/40 ZR18
	rolling_coeff=0.0180
	max_braking=500
	braking_factor=1
	max_handbrake_torque=3400
	tire_rate=230000
	pacejka~pacejka
	{
		optimal_slipratio=0.11
		optimal_slipangle=0.155
	}
}

wheel0~wheel_front
{
	x=0
	ackerman=1.15
	toe=-0
	camber=0.007	;-0.6
	model
	{
		file=lf.dof
	}
	model_brake
	{
		file=flb.dof
	}
}

wheel1~wheel_front
{
	x=0
	ackerman=-1.15
	toe=0
	camber=0.007
	model
	{
		file=rf.dof
	}
	model_brake
	{
		file=frb.dof
	}
}

wheel2~wheel_rear
{
	x=0
	toe=-0.21	;toe in, goes to out under bump like M3 Z axle
	camber=-0.588	;-1.5
	model
	{
		file=lf.dof
	}
	model_brake
	{
		file=flb.dof
	}
}

wheel3~wheel_rear
{
	x=0
	toe=0.21	;toe in, goes to out under bump like M3 Z axle
	camber=-0.588
	model
	{
		file=rf.dof
	}
	model_brake
	{
		file=frb.dof
	}
}

;	------------------ Artyfishul Intellygents -----------------
     
ai
{
	grip_factor=1.1
}

;	------------------ 5.1 ALPHA AUDIO COMPATABILTY -----------------

audio
{
  skid
  {
    sample=skid.wav
  }
  acc_all
  {
    attack=1000
    decay=1000
  }
  accelerate_out
  {
    volume=1.5
    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
    }
    smp2~audio.acc_all
    {
      sample=turbo2.wav
      min=2700
      max=3901
      natural=1500
    }
    smp3~audio.acc_all
    {
      sample=turbo3.wav
      min=4000
      max=8501
      natural=2500
    }
  }
  accelerate_in
  {
    volume=0.5
    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
    }
    smp2~audio.acc_all
    {
      sample=turbo2.wav
      min=2700
      max=3901
      natural=1500
    }
    smp3~audio.acc_all
    {
      sample=turbo3.wav
      min=4000
      max=8501
      natural=2500
    }
  }
  decelerate_in
  {
    volume=0.5
    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
    }
    smp2~audio.acc_all
    {
      sample=turbo2.wav
      min=2700
      max=3901
      natural=1500
    }
    smp3~audio.acc_all
    {
      sample=turbo3.wav
      min=4000
      max=8501
      natural=2500
    }
  }
   wind
   {
      smp0
      {
         volume=0.7
         sample=wind1.wav
         pitch_scale=2
         pitch_offset=2
         ; Speeds in m/s
         min=.5
         max=9999
         natural=20
      }
      smp1
      {
         volume=.5
         sample=driveshaft.wav
         pitch_scale=.5
         pitch_offset=.7
         ; Speeds in m/s
         min=.5
         max=9999
         natural=22
      }
   }
}


;----------------------driving aids----------------------
abs
{
  enable=1
  max_velocity_ratio=1.09 
  min_velocity_ratio=1.08
  min_velocity=1
}
traction_control
{
  	enable=1
  	min_velocity=1.667
  	max_velocity_ratio=1.050
  	min_velocity_ratio=1.300

}
;---------------------------------------------
;Cameras
;---------------------------------------------

camera0
{
  name=Driver
  fov=70
  model=1
  wheels=0
  view=1
  offset
  {
    x=0.35
    y=0.52
    z=-0.06
  }
  offset_to
  {
    x=0.43
    y=-0.5
    z=10
  }
  src
  {
    mass=1
    k=250
    damping=25
    maxdist=0.3
  }
  dst
  {
    mass=1
    k=0
    damping=0
    maxdist=0
  }
}
camera1
{
  name=Driver, left
  fov=60
  model=1
  wheels=0
  view=1
  offset
  {
    x=0.35
    y=0.47
    z=-0.031
  }
  offset_to
  {
    x=10.43
    y=0.5
    z=10
  }
  src
  {
    mass=1
    k=250
    damping=25
    maxdist=0.3
  }
  dst
  {
    mass=1
    k=0
    damping=0
    maxdist=0
  }
}
camera2
{
  name=Driver, right
  fov=60
  model=1
  wheels=0
  view=1
  offset
  {
    x=0.35
    y=0.47
    z=-0.031
  }
  offset_to
  {
    x=-9.57
    y=0.5
    z=10
  }
  src
  {
    mass=1
    k=250
    damping=25
    maxdist=0.3
  }
  dst
  {
    mass=1
    k=0
    damping=0
    maxdist=0
  }
}
camera3
{
  name=Driver, rear
  fov=-65
  model=0
  wheels=0
  view=0
  offset
  {
    x=0.2
    y=0.6
    z=-0.13
  }
  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=Driver2
  fov=70
  model=1
  wheels=0
  view=1
  offset
  {
    x=0.35
    y=0.47
    z=0.05
  }
  offset_to
  {
    x=0.43
    y=-0.5
    z=10
  }
  src
  {
    mass=1
    k=250
    damping=25
    maxdist=0.3
  }
  dst
  {
    mass=1
    k=0
    damping=0
    maxdist=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
	}
}