;Sounds originally from markomat666 ( http://www.youtube.com/user/markomat666 )
;converter of sounds Engine Of Darkness - permission granted from markomat666 ( asked via
;tducenterforum) to convert sounds to racer

car
{
	name=Lamborghini Murcielago LP640
	year=2009
	id=lambomurcielagoLP640
	credits=Model from airone racing,Conversion by RaphaelButhmann,Engine of Darkness sounds
	comments=640 HP,1665 KG,330 Km\h max
	version=082
	wheels=4
shadow
{
    texture=shadow.tga
    width=3.3
    length=5.45
    offset_z=0.2
}	
cg
	{
  x=0
  y=-0.158
  z=0.0275 ;(Weight distribution 42/58 %front/rear)
	}
  ff_factor=2
}
abs
{
	enable=1
	min_velocity=1.667
	max_velocity_ratio=1.10
	min_velocity_ratio=1.05
}
traction_control
{
	enable=1
	min_velocity=1.667
	max_velocity_ratio=1.050
	min_velocity_ratio=1.500
}
graphics
{
	shadow
	{
		model
		{
			file=shadow.dof
			use_shaders=0
		}
	}
}
ai
{
	understeer_correct=10
	oversteer_correct=10
	grip_factor=1.0
}
body
{
	mass=1455
	; 1665 - 120 (all wheels + unsprung mass)
	inertia
	{      
  x=1500
  y=2950
  z=600
	}
	cockpit_start=1
	cockpit_length=1
	model
	{
		file=body.dof
	}
	model_braking_l
	{
		file=brakelight.dof
	}
      model_collide
	{
		file=collision.dof
	}

	model_light_l
	{
		file=lighton.dof
	}
          model_incar
        {
         file=interior.dof
        }
      	model_lightroad_l
	{
		file=l_in.dof
	}
        model_reverse_l
        {
        file=r_light.dof
        }
	width=1.848
	height=1.236
	length=4.397
	manual_box=0
}
steer
{
	x=0.43
	y=0.27
	z=0.83
	radius=10
	xa=17.5
	lock=1260
	linearity=0.25		;3.5 turns lock to lock (1.75*(1/(real wheel lock/pc wheel lock))
 model
  {
      file=strwl.dof
  }
}
engine
{
	x=0
	y=0
	z=0
	size=0
	mass=0
	max_rpm=8000
	idle_rpm=1100
	curve_torque=torque.crv
	;can split 90% rear 10% front to 70% rear 30% front... set halfway at 80% rear 20% front
	max_torque=528
	idle_method=1
	autoclutch=1
	autoclutch_rpm=3600
	;0.306 in 3rd
	starter=1
	starter_torque=100
	start_stalled=1
	stall_rpm=400
	start_rpm=1250
	torque_reaction=0.1
	jitter
	{
		amplitude=0.50
		time_min=400
		time_var=600
		frequency_min=4
		frequency_var=8
	}
	shifting
	{
		fast=0
		automatic=0
		cut_throttle=1
		blip_throttle=0.5
		shift_up_rpm=7900
		shift_down_rpm=4000
		time_to_declutch=100
		time_in_neutral=100
		time_to_clutch=100
		time_to_declutch_down=150
		time_in_neutral_down=150
		time_to_clutch_down=150
	}
	inertia
	{
		engine=0.22
		final_drive=0.12
	}
	braking_coeff=2.6
}
fuel
{
	; Fuel type: 0=gasoline, 1=diesel. Determines efficiencies
	type=0
	; Max storage in liters
	max=70.0
	; Brake specific fuel consumption (gram/Joule); an idea of the efficiency of the engine
	bsfc=6.344e-5
}
gearbox
{
	gears=7
	gear0
	{
		ratio=-2.692
		inertia=0.01
		engine_map=1
	}
	gear1
	{
		ratio=3.091
		inertia=0.02
		engine_map=1
	}
	gear2
	{
		ratio=2.105
		inertia=0.04
		engine_map=1
	}
	gear3
	{
		ratio=1.565
		inertia=0.07
		engine_map=1
	}
	gear4
	{
		ratio=1.241
		inertia=0.12
		engine_map=1
	}
	gear5
	{
		ratio=1.065
		inertia=0.19
		engine_map=1
	}
	gear6
	{
		ratio=0.939
		inertia=0.27
		engine_map=0.5
	}
      end_ratio=3.16
}
clutch
{
	max_torque=1000
}
handbrakes
{
	wheels=23
}
differential
{
  type=1
  ratio=3.16
  inertia=0.05
  locking_coeff=155
}
aero
{
	body
	{
		center=0 0 0
		cx=0.34
		area=1.9	;1.85 for car, 0.05 for front wheel cross section...
	}
	wings=1
	wing0
	{
		name=Overall aerodynamic effect
		center=0 0.06 -1.071
            span=1
		cord=0.1
		coeff_drag=0.3
		coeff_down=4
		center=0 -0.2 0
		angle=13
		angle_offset=10
	}
}
antirollbar
{
	count=2
	arb0
	{
		susp_left=1
		susp_right=0
		k=14500
	}
	arb1
	{
		susp_left=3
		susp_right=2
		k=15500
	}
}
susp_front
{
	y=0
	z=1.599
	restlen=0.16	;0.1m RL, 3625N load
	minlen=0.02
	maxlen=0.24
	bumpstop_len=0.04
	bumpstop_k=70000
	k=86150
	damper_curve=damper_front.crv
	bump_rate=6780	;static optimum damping 11286*0.6
	rebound_rate=10160	;static optimum damping 11286*0.9
	anti_dive=0.1
	anti_lift=0
	roll_center
	{
		x=0
		y=-0.375	;30mm RC, 305mm(wheel radius) + 100mm(rest length
		z=0
	}
}
susp_rear
{
	y=0
	z=-1.09
	restlen=0.16	;0.09m RL, 5005N load
	minlen=0.02
	maxlen=0.24
	bumpstop_len=0.04
	bumpstop_k=70000
	k=89375
	damper_curve=damper_rear.crv
	bump_rate=6750	;static optimum damping 13508*0.5
	rebound_rate=10800	;static optimum damping 13508*0.8
	anti_rise=0.15
	anti_squat=0.25
	roll_center
	{
		x=0
		y=-0.365	;50mm RC, 325mm(wheel radius) + 90mm(rest length) = 
		z=0
	}
}
; Wheelbase 2665mm
; Front track 1635mm
; Rear track 1695mm
; Ground clearance 135mm
; Weight distribution 42% front, 58% rear
susp0~susp_front
{
	x=0.77
}
susp1~susp_front
{
	x=-0.77
}
susp2~susp_rear
{
	x=0.8275
}
susp3~susp_rear
{
	x=-0.8275
}
tire_model_front
{
  damping_predict_lat=0
  damping_predict_long=0
}
tire_model_rear
{
  damping_predict_lat=0
  damping_predict_long=0
}
pacejka
{
  ; Pacejka constants for all tires
  ; Lateral force
  a0=1.25
  a1=-35
  a2=1200
  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
  ; Longitudinal force
  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
  ; Aligning moment
  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
}
wheel_all
{
	; Brakedisc temperature
	brake_heating=0.003
	brake_dissipation=0.0005
	brake_max_temp=1000
	ackerman=1
	camber=0
}
wheel_front~wheel_all
{
	y=0
	z=0
	steering=1
	lock=48
	mass=30
	inertia=0.7
	radius=0.335
	rolling_coeff=0.015
	max_braking=2600
	braking_factor=1
	tire_rate=275000
	powered=1
      power_gearing=0.395
	pacejka~pacejka
	{ 
	}
	;245/35ZR18
}
wheel_rear~wheel_all
{
	y=0
	z=0
      powered=1
	steering=0
	mass=30
	inertia=0.7
	radius=0.345
	rolling_coeff=0.015
	max_braking=1800
	braking_factor=0.9
	tire_rate=275000
	max_handbrake_torque=4000
	pacejka~pacejka
	{		
            a2=1450
		a3=2100
		a4=9
		b2=1450
		b4=350
		optimal_slipratio=0.11
		optimal_slipangle=0.157


	}
	;335/30ZR18
}
wheel0~wheel_front
{
	x=-0
	toe=-0
	model
	{
		file=fl.dof
	}
	model_brake
	{
		file=flb.dof
	}
}
wheel1~wheel_front
{
	x=0
	toe=0
	model
	{
		file=fr.dof
	}
	model_brake
	{
		file=frb.dof
	}
}
wheel2~wheel_rear
{
	x=0
	toe=-0.5
	model
	{
		file=rl.dof
	}
	model_brake
	{
		file=rlb.dof
	}
}
wheel3~wheel_rear
{
	x=0
	toe=0.5
	model
	{
		file=rr.dof
	}
	model_brake
	{
		file=rrb.dof
	}
}
camera0
{
  name=Chase Close
  model=0
  wheels=0
  view=0
  fov=60
  offset
  {
    x=0
    y=1.4
    z=-4.7
  }
  src
  {
    mass=6
    k=600
    damping=120
    maxdist=2
  }
}
camera1
{
	name=Driver
	fov=60
	model=1
	wheels=0
	view=2
	name=Inside
	fov=60

	follow
	{
		pitch=1
		yaw=1
		roll=1
	}
	offset
	{
		x=0.358
		y=0.54
		z=0.23
	}
	offset_to
	{
		x=0
		y=0
		z=10
	}
	angle
	{
		x=1.000000
		y=180.000000
		z=0.000000
	}
	src
	{
		mass=5
		k=750
		damping=75
		maxdist=0.2
	}
	dst
	{
		mass=0
		k=0
		damping=0
		maxdist=0
	}
}
camera2
{
	offset
	{
		x=-0.42
		y=-0.5
		z=0.42
	}
	angle
	{
		x=5
		y=180
		z=0
	}
	name=DriverRight
	fov=65
	follow
	{
		pitch=1
		yaw=1
		roll=1
	}
}
camera3
{
	follow
	{
		pitch=1
		yaw=1
		roll=1
	}
	offset
	{
		x=0
		y=-0.6
		z=1.4
	}
	angle
	{
		x=4
		y=180
		z=0
	}
	name=Inside Right Driver
	fov=70
}
camera4
{
	offset
	{
		x=-0.4
		y=0.45
		z=-7.5
	}
	angle
	{
		x=16
		y=130
		z=0.25
	}
}
camera5
{
	follow
	{
		pitch=0
		yaw=1
		roll=0
	}
	offset
	{
		x=0.48
		y=0.50
		z=-3.9
	}
	angle
	{
		x=15
		y=-50
		z=2.5
	}
	name=Wheels
	fov=65
}
camera6
{
	follow
	{
		pitch=1
		yaw=1
		roll=0
	}
	offset
	{
		x=-0.25
		y=0.75
		z=-4.8
	}
	angle
	{
		x=23
		y=-360
		z=20
	}
	fov=60
}
camera7
{
	offset
	{
		x=1.8
		y=0
		z=-0.4
		;z=-0.6
	}
	angle
	{
		x=-2
		y=-140
		z=3
	}
	follow
	{
		pitch=0
		yaw=1
		roll=1
	}
	fov=60
}
camera8
{
	offset
	{
		x=0
		y=0
		z=-5
	}
	angle
	{
		x=2
		y=-130
		z=3
	}
	follow
	{
		pitch=0
		yaw=1
		roll=1
	}
	fov=65
}
camera9
{
	follow
	{
		pitch=1
		yaw=1
		roll=1
	}
	offset
	{
		x=1.4
		y=-0.0
		z=-0.48
	}
	angle
	{
		x=3.055556
		y=9.305529
		z=7.552083
	}
	name=High
	fov=65
}
;	------------------ 5.1 ALPHA AUDIO COMPATABILTY -----------------
audio
{
 accelerate_out
 {
  volume=2
  smp0
  {
   sample=audio/idle.wav
   min=0
   max=750
   attack=1000
   decay=2000
   natural=1000
   volume=0.75
  }
  smp1
  {
   sample=audio/onlow.wav
   min=0
   max=2000
   attack=2000
   decay=2900
   natural=3800
   volume=1
  }
  smp2
  {
   sample=audio/onmid.wav
   min=4000
   max=5000
   attack=2000
   decay=1000
   natural=4300
   volume=0.75
  }
  smp3
  {
   sample=audio/onhigh.wav
   min=7000
   max=8900
   attack=2000
   decay=1000
   natural=6000
   volume=1.25
  }
 }
 decelerate_out
 {
  volume=0.75
  smp0
  {
   sample=audio/idle.wav
   min=0
   max=750
   attack=1000
   decay=2000
   natural=1000
   volume=0.75
  }
  smp1
  {
   sample=audio/onlow.wav
   min=0
   max=2000
   attack=2000
   decay=2000
   natural=2900
   volume=1
  }
  smp2
  {
   sample=audio/onmid.wav
   min=4000
   max=5000
   attack=2000
   decay=1000
   natural=4300
   volume=1
  }
  smp3
  {
   sample=audio/onhigh.wav
   min=7000
   max=10500
   attack=2000
   decay=1000
   natural=8500
   volume=1
  }
 }
 accelerate_in
 {
  volume=1
  smp0
  {
   sample=audio/in_idle.wav
   min=0
   max=750
   attack=1000
   decay=2000
   natural=1000
   volume=0.75
  }
  smp1
  {
   sample=audio/offlow.wav
   min=0
   max=2000
   attack=2000
   decay=2000
   natural=2900
   volume=1
  }
  smp2
  {
   sample=audio/offmid.wav
   min=4000
   max=5000
   attack=2000
   decay=1000
   natural=4300
   volume=0.6
  }
  smp3
  {
   sample=audio/offhigh.wav
   min=7000
   max=10500
   attack=2000
   decay=1000
   natural=6000
   volume=0.75
  }
 }
 decelerate_in
 {
  volume=0.5
  smp0
  {
   sample=audio/idle.wav
   min=0
   max=750
   attack=1000
   decay=2000
   natural=1000
   volume=0.75
  }
  smp1
  {
   sample=audio/offlow.wav
   min=0
   max=2000
   attack=2000
   decay=2000
   natural=2900
   volume=1
  }
  smp2
  {
   sample=audio/offmid.wav
   min=4000
   max=5000
   attack=2000
   decay=1000
   natural=4300
   volume=1
  }
  smp3
  {
   sample=audio/offhigh.wav
   min=7000
   max=10500
   attack=2000
   decay=1000
   natural=6000
   volume=1
  }
 }
wind
	{
		pitch_scale=0.2
		pitch_offset=10
		smp0
		{
			sample=audio/wind.wav
			volume=0.5
			min=25
			max=400
			attack=25
			decay=100
			natural=10
		}
	}	
	skid
	{
		volume=1
		smp0
		{
			sample=audio/skid_rubbing.wav
			min=0.1
			max=0.1
			attack=0.05
			decay=0.2
		}
		smp1
		{
			sample=audio/skid_mid.wav
			min=0.2
			max=0.7
			attack=0.1
			decay=0.4
		}
		smp2
		{
			sample=audio/skid_high.wav
			min=1.1
			max=20
			attack=0.4
			decay=0.4
		}
	}
}